MIL/C04_Sets_and_Functions/solutions/Solutions_S02_Functions.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
31 declarations, 0 contain sorry, 0 declared as axioms
Imports (4)
- example
(example at line 16)line 16 source - example
(example at line 26)line 26 source - example
(example at line 31)line 31 source - example
(example at line 35)line 35 source - example
(example at line 45)line 45 source - example
(example at line 49)line 49 source - example
(example at line 52)line 52 source - example
(example at line 55)line 55 source - example
(example at line 61)line 61 source - example
(example at line 70)line 70 source - example
(example at line 81)line 81 source - example
(example at line 84)line 84 source - example
(example at line 91)line 91 source - example
(example at line 95)line 95 source - example
(example at line 99)line 99 source - example
(example at line 107)line 107 source - example
(example at line 115)line 115 source - example
(example at line 121)line 121 source - example
(example at line 134)line 134 source - example
(example at line 138)line 138 source - example
(example at line 148)line 148 source - example
(example at line 156)line 156 source - example
(example at line 165)line 165 source - example
(example at line 177)line 177 source - def
inverseline 196 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
InhabitedProof uses:
dite,Exists,Eq,Classical.propDecidable,Classical.choose,Not,Inhabited.defaultAlso declared: MIL/C04_Sets_and_Functions/S02_Functions.lean:153 (same declaration text).
- theorem
inverse_specline 199 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Inhabited,Exists,Eq, inverseProof uses:
Eq.mpr,dite,Classical.propDecidable,Classical.choose,Not,Inhabited.default,id,congrArg,inverse.eq_1,dif_pos,Classical.choose_specAlso declared: MIL/C04_Sets_and_Functions/S02_Functions.lean:156 (same declaration text).
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
- example
(example at line 207)line 207 source - example
(example at line 216)line 216 source - example
(example at line 219)line 219 source - example
(example at line 228)line 228 source - theorem
CantorCantor: no function from α to its power set is surjective line 237 sourceL4DEL explanation
Build the set of elements not in their own image; it cannot be anyone's image.
- intro f surjf assumes f : α → Set α is surjective, and the goal becomes a contradiction.
- let S := { i | i ∉ f i } defines the diagonal set, and rcases surjf S gives j with f j = S.
- h₁ shows j ∉ f j, by assuming j ∈ f j, rewriting with f j = S to get j ∉ f j, and contradiction.
- From h₁, j ∈ S holds by definition of S (h₂), while rewriting f j = S in h₁ gives j ∉ S (h₃).
- h₂ and h₃ contradict each other, which closes the goal.
Sources and attribution: Pinned Lean source (dd6d752fedb1)
no axioms what this means
Statement uses:
Set,Not,Function.SurjectiveProof uses:
setOf,Membership.mem,Eq,Exists,False,Eq.mp,congrArg,False.elim2 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: MIL/C04_Sets_and_Functions/S02_Functions.lean:176 (same statement text; different proof or body). Qualify references as Cantor@path.
surjective: a function f is surjective when every element of its target equals f x for some x.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
theorem Cantor : ∀ f : α → Set α, ¬Surjective f := by …
Mentions: f