Alectryon captures goals and hypotheses as Lean3 proofs progress. This allows you to document the state of a proof step-by-step.
Similar to the Coq integration, you can use the following features to reference or quote the captured proof state:
- References (
:mref:): Link to specific steps or hypotheses (e.g., :mref:.s(intro H)`). - Quotes (
:mquote:): Quote specific parts of the proof state (e.g., :mquote:.s(and.intro).h#H.type`). - Assertions (
.. massert::): Assert properties about the proof state at a specific goal or step.
example (p q r : Prop) : p ∧ q ↔ q ∧ p :=
begin /- .none -/
apply iff.intro, {
intro H,
apply and.intro, /- .unfold -/
apply (and.elim_right H),
apply (and.elim_left H),
}, {
intro H,
apply and.intro,
apply (and.elim_right H),
apply (and.elim_left H),
}
end
Usage in reST:
.. massert:: .s(apply iff.intro).g#2
.. mquote:: .s(apply iff.intro).g#2.ccl