Plain-language statement
Induction principle for finite sets.
Exact Lean statement
theorem set_ind {P : S → Prop}
(hemp : P ∅)
(hadd : ∀ x X, x ∉ X → P X → P (insert x X))
(X : S) : P XFormal artifact
Lean source
theorem set_ind {P : S → Prop} (hemp : P ∅) (hadd : ∀ x X, x ∉ X → P X → P (insert x X)) (X : S) : P X := by apply WellFounded.induction set_wf X intro Y IH by_cases hempty : size Y = 0 · rw [size_empty] at hempty subst hempty apply hemp · obtain ⟨x, hmem⟩ := set_choose Y hempty let Y' := Y \ {x} have hnotin : x ∉ Y' := by subst Y' simp [mem_diff, mem_singleton] have hPY' : P Y' := by apply IH subst Y' rw [ssubset_subset] constructor · intro p; rw [mem_diff, mem_singleton] grind only · intro H; rw [<-H] at hmem rw [mem_diff, mem_singleton] at hmem exact hmem.right rfl have heq : Y = {x} ∪ Y' := by ext z subst Y' rw [mem_union, mem_singleton, mem_diff, mem_singleton] rw [mem_diff, mem_singleton] at hnotin grind have : P ({x} ∪ Y') := by rw [singleton_insert, insert_union_comm, union_empty_left] apply hadd · subst Y'; rw [mem_diff, mem_singleton] rintro ⟨_, H⟩; apply H rfl · assumption rw [heq] exact this- Project
- Iris-Lean
- License
- Apache-2.0
- Commit
- 37f53e0ac065
- Source
- Iris/Iris/Std/GenSets.lean:1244-1282
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Co Pset Raw eq
CoPset.coPsetRaw_eq
Plain-language statement
Two CoPsetRaw trees are equal if they have the same membership function and both are well-formed.
Source project: Iris-Lean
Person-level attribution pending.
Inj on of nodup map
FromMathlib.inj_on_of_nodup_map
Plain-language statement
NB. Copied from Mathlib
Source project: Iris-Lean
Person-level attribution pending.
Big Op L hom weak
Iris.Algebra.BigOpL.bigOpL_hom_weak
Plain-language statement
Weak monoid homomorphisms distribute over non-empty big ops.
Source project: Iris-Lean
Person-level attribution pending.