All proofs
Project-declaredLean 4.32.1 · null

Set ind

Iris.Std.FiniteSet.set_ind

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 X

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
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

Project-declaredLean 4.32.1

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.

separation logicprogram logicsemantics

Source project: Iris-Lean

Person-level attribution pending.

View proof record
Project-declaredLean 4.32.1

Inj on of nodup map

FromMathlib.inj_on_of_nodup_map

Plain-language statement

NB. Copied from Mathlib

separation logicprogram logicsemantics

Source project: Iris-Lean

Person-level attribution pending.

View proof record
Project-declaredLean 4.32.1

Big Op L hom weak

Iris.Algebra.BigOpL.bigOpL_hom_weak

Plain-language statement

Weak monoid homomorphisms distribute over non-empty big ops.

separation logicprogram logicsemantics

Source project: Iris-Lean

Person-level attribution pending.

View proof record