Skip to content

Tutorial Ltac2 for Ltac1 users#131

Merged
thomas-lamiaux merged 17 commits into
rocq-prover:mainfrom
thomas-lamiaux:tuto-Ltac2forLtac1
May 17, 2026
Merged

Tutorial Ltac2 for Ltac1 users#131
thomas-lamiaux merged 17 commits into
rocq-prover:mainfrom
thomas-lamiaux:tuto-Ltac2forLtac1

Conversation

@thomas-lamiaux
Copy link
Copy Markdown
Collaborator

@thomas-lamiaux thomas-lamiaux commented Apr 29, 2026

  • Introduction
  • Using Ltac2 to write proofs
  • Ltac2 is a Proper Functional Programming Language
  • Ltac2 as a Meta-Programming Language for Rocq
  • Small Case Study

@thomas-lamiaux thomas-lamiaux marked this pull request as ready for review April 30, 2026 23:45
Copy link
Copy Markdown

@Durbatuluk1701 Durbatuluk1701 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I was overly pedantic, just excited to have high quality Ltac2 docs. I think it looks great, thanks for undertaking the task!

Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Copy link
Copy Markdown

@agontard agontard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thank you for this tutorial! It felt indeed like a nice introduction.
Here are some comments I have (note that perhaps some differences are due to compiling with Rocq 9.1).
Apologies for the amount, I tried to exhaustively list everything I noticed/didn't understand.

Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
@thomas-lamiaux
Copy link
Copy Markdown
Collaborator Author

Apologies for the amount, I tried to exhaustively list everything I noticed/didn't understand.

@agontard Don't worry, as long as they are useful it is good to report them.
Unhelpful comment are stuff like "I would have written this sentence differently cause I prefer this style of writing or proof writing as this one".

hypothesis named [id] regardless of what was passed.

To pass Ltac1 values across this boundary, one uses the binder syntax
[ltac2:(x1 .. xn |- expr)], which explicitly receives Ltac1 values as Ltac2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was unclear which Ltac1 values it would receive/how. This change would clarify it for me:

"explicitly receives Ltac1 values as Ltac2" -> "explicitly receives the Ltac1 values x1 .. xn as Ltac2"

Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v

but is lacking a notation enabling us to directly write [clearbody x y] to
clear the body of the local definitions [x] and [y].
This problem will be solved over time with contributions to the standard library.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a political question, it is not clear that we want to add such notations.

Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v Outdated
Comment thread src/metaprogramming/ltac2/tutorial_ltac2_for_ltac1_users.v
@thomas-lamiaux
Copy link
Copy Markdown
Collaborator Author

@SkySkimmer as the Ltac2 expert is the content correct ?
If so I will merge

@thomas-lamiaux thomas-lamiaux merged commit beb9bb2 into rocq-prover:main May 17, 2026
1 check passed
@thomas-lamiaux thomas-lamiaux deleted the tuto-Ltac2forLtac1 branch May 17, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants