Download data/lean/OAI/Combinatorics/InfiniteMatroid/FiniteCounting.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.12 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/InfiniteMatroid/FiniteCounting.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/InfiniteMatroid/FiniteCounting.lean
-
curl -L -o FiniteCounting.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/InfiniteMatroid/FiniteCounting.lean
2.12 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| open Set | |
| namespace InfiniteMatroidCounterexample | |
| noncomputable def splitFunction {A B V : Type*} (e : A βͺ B) : | |
| (B β V) β (A β V) Γ ({b : B // b β Set.range e} β V) := by | |
| classical | |
| exact (Equiv.piEquivPiSubtypeProd (Β· β Set.range e) (fun _ β¦ V)).trans | |
| (Equiv.prodCongr ((Equiv.ofInjective e e.injective).arrowCongr (Equiv.refl V)).symm (Equiv.refl _)) | |
| @[simp] lemma splitFunction_fst {A B V : Type*} (e : A βͺ B) (f : B β V) : | |
| (splitFunction e f).1 = fun a β¦ f (e a) := rfl | |
| lemma card_restriction {A B V : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] [Fintype V] | |
| (e : A βͺ B) (P : (A β V) β Prop) [DecidablePred P] : | |
| Fintype.card {f : B β V // P (fun a β¦ f (e a))} = | |
| Fintype.card {g : A β V // P g} * Fintype.card V ^ (Fintype.card B - Fintype.card A) := by | |
| classical | |
| let fs := splitFunction (V := V) e | |
| have he := (fs.subtypeEquiv (p := fun f β¦ P (fun a β¦ f (e a))) | |
| (q := fun f β¦ P f.1) (fun f β¦ by simp [fs])).trans Equiv.prodSubtypeFstEquivSubtypeProd | |
| have hc : Fintype.card {b : B // b β Set.range e} = Fintype.card A := | |
| (Fintype.card_congr (Equiv.ofInjective e e.injective)).symm | |
| rw [Fintype.card_congr he, Fintype.card_prod, Fintype.card_fun, | |
| Fintype.card_subtype_compl, hc] | |
| lemma function_density_restriction {A B : Type*} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B] | |
| (e : A βͺ B) (P : (A β Bool) β Prop) [DecidablePred P] : | |
| (Fintype.card {f : B β Bool // P (fun a β¦ f (e a))} : β) / Fintype.card (B β Bool) = | |
| (Fintype.card {g : A β Bool // P g} : β) / Fintype.card (A β Bool) := by | |
| rw [card_restriction] | |
| simp only [Fintype.card_fun, Fintype.card_bool, Nat.cast_mul, Nat.cast_pow, Nat.cast_ofNat] | |
| have hle : Fintype.card A β€ Fintype.card B := Fintype.card_le_of_injective e e.injective | |
| have heq : (2:β) ^ Fintype.card B = 2 ^ Fintype.card A * 2 ^ (Fintype.card B - Fintype.card A) := by | |
| rw [β pow_add, Nat.add_sub_of_le hle] | |
| rw [heq] | |
| field_simp | |
| end InfiniteMatroidCounterexample | |
| end | |
| end OAI | |