MIL/C06_Discrete_Mathematics/solutions/Solutions_S03_Inductive_Structures.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 Mathematics in Lean documentation, Pinned Mathematics in Lean textbook
18 declarations, 0 contain sorry, 0 declared as axioms
Imports (1)
- def
MyListSpace3.reverseline 11 sourceno axioms what this means
Statement uses:
List2 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:64 (different declaration text). Qualify references as MyListSpace3.reverse@path.
- theorem
MyListSpace3.reverse_appendline 15 sourcestandard axioms: propext what this means
Statement uses:
List,Eq,MyListSpace3.reverse,HAppend.hAppendProof uses:
List.rec,Eq.mpr,List.nil,id,congrArg,List.nil_append,MyListSpace3.reverse.eq_1,List.append_nil,Eq.refl,List.cons,List.cons_append,MyListSpace3.reverse.eq_2,List.append_assoc4 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:66 (same statement text; different proof or body). Qualify references as MyListSpace3.reverse_append@path.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- theorem
MyListSpace3.reverse_reverseline 20 sourcestandard axioms: propext what this means
Statement uses:
List,Eq,MyListSpace3.reverseProof uses:
List.rec,Eq.refl,List.nil,Eq.mpr,List.cons,HAppend.hAppend,id,congrArg,MyListSpace3.reverse.eq_2,MyListSpace3.reverse_append,MyListSpace3.reverse.eq_1,List.nil_append,List.cons_append2 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:69 (same statement text; different proof or body). Qualify references as MyListSpace3.reverse_reverse@path.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
- inductive
BinTreeline 27 sourceno axioms what this means
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:73 (same declaration text).
- def
BinTree.sizeline 33 sourceno axioms what this means
Statement uses: BinTree,
Nat2 instances, coercions and auxiliary constants left out.
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:79 (same declaration text).
- def
BinTree.depthline 37 sourceno axioms what this means
Statement uses: BinTree,
Nat2 instances, coercions and auxiliary constants left out.
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:83 (same declaration text).
- theorem
BinTree.depth_le_sizeline 41 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: BinTree,
LE.le,Nat, BinTree.depth, BinTree.size4 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:100 (different declaration text). Qualify references as BinTree.depth_le_size@path.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- def
BinTree.flipline 51 sourceno axioms what this means
Statement uses: BinTree
2 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:102 (different declaration text). Qualify references as BinTree.flip@path.
- example
BinTree.(example at line 55)line 55 source - theorem
BinTree.size_flipline 58 sourcestandard axioms: Quot.sound, propext what this means
Statement uses: BinTree,
Eq,Nat, BinTree.size,BinTree.flip2 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:107 (different declaration text). Qualify references as BinTree.size_flip@path.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- inductive
PropFormline 66 sourceno axioms what this means
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:110 (same declaration text).
- def
PropForm.evalline 74 sourceno axioms what this means
Statement uses: PropForm,
Nat,Bool2 instances, coercions and auxiliary constants left out.
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:118 (same declaration text).
- def
PropForm.varsline 81 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: PropForm,
Finset,Nat2 instances, coercions and auxiliary constants left out.
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:125 (same declaration text).
- def
PropForm.substline 88 sourceno axioms what this means
Statement uses: PropForm,
Nat2 instances, coercions and auxiliary constants left out.
Also declared: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:147 (same declaration text).
- theorem
PropForm.subst_eq_of_not_mem_varsline 95 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: PropForm,
Nat,Not,Membership.mem,Finset, PropForm.vars,Eq, PropForm.subst6 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:154 (different declaration text). Qualify references as PropForm.subst_eq_of_not_mem_vars@path.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
- theorem
PropForm.subst_eq_of_not_mem_vars'alternative proof: line 107 sourceSource comment
alternative proof:standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: PropForm,
Nat,Not,Membership.mem,Finset, PropForm.vars,Eq, PropForm.subst6 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
theorem subst_eq_of_not_mem_vars' (A : PropForm) (n : ℕ) (C : PropForm): n ∉ A.vars → A.subst n C = A := by …Mentions: PropForm
- theorem
PropForm.subst_eval_eqline 111 sourcestandard axioms: propext what this means
Statement uses: PropForm,
Nat,Bool,Eq, PropForm.eval, PropForm.subst,ite4 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C06_Discrete_Mathematics/S03_Inductive_Structures.lean:157 (different declaration text). Qualify references as PropForm.subst_eval_eq@path.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
- theorem
PropForm.subst_eval_eq'alternative proof: line 126 sourceSource comment
alternative proof:standard axioms: propext what this means
Statement uses: PropForm,
Nat,Bool,Eq, PropForm.eval, PropForm.subst,ite4 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
theorem subst_eval_eq' (A : PropForm) (n : ℕ) (C : PropForm) (v : ℕ → Bool) : (A.subst n C).eval v = A.eval (fun m => if m = n then C.eval v else v m) := by …Mentions: PropForm, PropForm.eval