FormalConjecturesUtil/Linters/AnswerLinterTest.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
4 declarations, 3 contain sorry, 0 declared as axioms
Tests for the answer linter
This file contains test cases for the AnswerLinter, verifying that it correctly flags
theorems with early arguments when answer(sorry) is the left-hand side of an iff,
and does not flag theorems without answer(sorry) or without early arguments.
- theorem
AnswerLinter.flagged_by_linterAn exampe of what we want to lint against sorry line 46 sourceSource documentation
An exampe of what we want to lint against
depends on sorry what this means
Statement uses:
True,Nat,Iff,Eq,HAdd.hAdd,OfNat.ofNatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem flagged_by_linter (h : True) (b : Nat) : answer(sorry) ↔ 1 + 1 = 2 := by …
- theorem
AnswerLinter.not_flagged_no_answer_sorryAn non-exampe: we want don't to lint against this case line 51 sourceSource documentation
An non-exampe: we want don't to lint against this case
no axioms what this means
Statement uses:
True,Nat,Eq,HAdd.hAdd,OfNat.ofNatProof uses:
Eq.refl6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem not_flagged_no_answer_sorry (_ : True) (_ : Nat) : 1 + 1 = 2 := by …
- theorem
AnswerLinter.not_flagged_no_argumentsAn non-exampe: we want don't to lint against this case sorry line 56 sourceSource documentation
An non-exampe: we want don't to lint against this case
depends on sorry what this means
Statement uses:
Iff,True,Eq,Nat,HAdd.hAdd,OfNat.ofNatProof uses:
sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem not_flagged_no_arguments : answer(sorry) ↔ 1 + 1 = 2 := by …
- theorem
AnswerLinter.not_flagged_non_prop_answerAn non-exampe: hereanswer(sorry)is not aProp, and not the entire left hand side of the iff sorry line 62 sourceSource documentation
An non-exampe: here
answer(sorry)is not aProp, and not the entire left hand side of the iff.depends on sorry what this means
Statement uses:
True,Nat,Iff,Eq,sorryAx,Lean.Name,Bool.false,Lean.Name.num,Lean.Name.str,Lean.Name.anonymous,OfNat.ofNat,HAdd.hAdd6 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem not_flagged_non_prop_answer (h : True) (b : Nat) : answer(sorry) = 2 ↔ 1 + 1 = 2 := by …