Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | rank int64 0 2.4k |
|---|---|---|---|---|---|---|
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 85 | 89 | theorem Multiset.trop_inf [LinearOrder R] [OrderTop R] (s : Multiset R) :
trop s.inf = Multiset.sum (s.map trop) := by |
induction' s using Multiset.induction with s x IH
Β· simp
Β· simp [β IH]
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 92 | 96 | theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S β R) :
trop (s.inf f) = β i β s, trop (f i) := by |
convert Multiset.trop_inf (s.val.map f)
simp only [Multiset.map_map, Function.comp_apply]
rfl
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 99 | 103 | theorem trop_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S) (f : S β WithTop R) :
trop (sInf (f '' s)) = β i β s, trop (f i) := by |
rcases s.eq_empty_or_nonempty with (rfl | h)
Β· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, trop_top]
rw [β inf'_eq_csInf_image _ h, inf'_eq_inf, s.trop_inf]
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 106 | 108 | theorem trop_iInf [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S β WithTop R) :
trop (β¨
i : S, f i) = β i : S, trop (f i) := by |
rw [iInf, β Set.image_univ, β coe_univ, trop_sInf_image]
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 111 | 116 | theorem Multiset.untrop_sum [LinearOrder R] [OrderTop R] (s : Multiset (Tropical R)) :
untrop s.sum = Multiset.inf (s.map untrop) := by |
induction' s using Multiset.induction with s x IH
Β· simp
Β· simp only [sum_cons, ge_iff_le, untrop_add, untrop_le_iff, map_cons, inf_cons, β IH]
rfl
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 119 | 123 | theorem Finset.untrop_sum' [LinearOrder R] [OrderTop R] (s : Finset S) (f : S β Tropical R) :
untrop (β i β s, f i) = s.inf (untrop β f) := by |
convert Multiset.untrop_sum (s.val.map f)
simp only [Multiset.map_map, Function.comp_apply]
rfl
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 126 | 130 | theorem untrop_sum_eq_sInf_image [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S β Tropical (WithTop R)) : untrop (β i β s, f i) = sInf (untrop β f '' s) := by |
rcases s.eq_empty_or_nonempty with (rfl | h)
Β· simp only [Set.image_empty, coe_empty, sum_empty, WithTop.sInf_empty, untrop_zero]
Β· rw [β inf'_eq_csInf_image _ h, inf'_eq_inf, Finset.untrop_sum']
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 133 | 136 | theorem untrop_sum [ConditionallyCompleteLinearOrder R] [Fintype S] (f : S β Tropical (WithTop R)) :
untrop (β i : S, f i) = β¨
i : S, untrop (f i) := by |
rw [iInf,β Set.image_univ,β coe_univ, untrop_sum_eq_sInf_image]
rfl
| 1,221 |
import Mathlib.Algebra.BigOperators.Group.Finset
import Mathlib.Data.List.MinMax
import Mathlib.Algebra.Tropical.Basic
import Mathlib.Order.ConditionallyCompleteLattice.Finset
#align_import algebra.tropical.big_operators from "leanprover-community/mathlib"@"d6fad0e5bf2d6f48da9175d25c3dc5706b3834ce"
variable {R S :... | Mathlib/Algebra/Tropical/BigOperators.lean | 141 | 143 | theorem Finset.untrop_sum [ConditionallyCompleteLinearOrder R] (s : Finset S)
(f : S β Tropical (WithTop R)) : untrop (β i β s, f i) = β¨
i : s, untrop (f i) := by |
simpa [β _root_.untrop_sum] using (sum_attach _ _).symm
| 1,221 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 48 | 48 | theorem xgcd_zero_left {s t r' s' t'} : xgcdAux 0 s t r' s' t' = (r', s', t') := by | simp [xgcdAux]
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 51 | 54 | theorem xgcdAux_rec {r s t r' s' t'} (h : 0 < r) :
xgcdAux r s t r' s' t' = xgcdAux (r' % r) (s' - r' / r * s) (t' - r' / r * t) r s t := by |
obtain β¨r, rflβ© := Nat.exists_eq_succ_of_ne_zero h.ne'
simp [xgcdAux]
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 74 | 76 | theorem gcdA_zero_left {s : β} : gcdA 0 s = 0 := by |
unfold gcdA
rw [xgcd, xgcd_zero_left]
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 80 | 82 | theorem gcdB_zero_left {s : β} : gcdB 0 s = 1 := by |
unfold gcdB
rw [xgcd, xgcd_zero_left]
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 86 | 90 | theorem gcdA_zero_right {s : β} (h : s β 0) : gcdA s 0 = 1 := by |
unfold gcdA xgcd
obtain β¨s, rflβ© := Nat.exists_eq_succ_of_ne_zero h
rw [xgcdAux]
simp
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 94 | 98 | theorem gcdB_zero_right {s : β} (h : s β 0) : gcdB s 0 = 0 := by |
unfold gcdB xgcd
obtain β¨s, rflβ© := Nat.exists_eq_succ_of_ne_zero h
rw [xgcdAux]
simp
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 108 | 109 | theorem xgcdAux_val (x y) : xgcdAux x 1 0 y 0 1 = (gcd x y, xgcd x y) := by |
rw [xgcd, β xgcdAux_fst x y 1 0 0 1]
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 112 | 113 | theorem xgcd_val (x y) : xgcd x y = (gcdA x y, gcdB x y) := by |
unfold gcdA gcdB; cases xgcd x y; rfl
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 123 | 132 | theorem xgcdAux_P {r r'} :
β {s t s' t'}, P x y (r, s, t) β P x y (r', s', t') β P x y (xgcdAux r s t r' s' t') := by |
induction r, r' using gcd.induction with
| H0 => simp
| H1 a b h IH =>
intro s t s' t' p p'
rw [xgcdAux_rec h]; refine IH ?_ p; dsimp [P] at *
rw [Int.emod_def]; generalize (b / a : β€) = k
rw [p, p', Int.mul_sub, sub_add_eq_add_sub, Int.mul_sub, Int.add_mul, mul_comm k t,
mul_comm k s, β mu... | 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 139 | 141 | theorem gcd_eq_gcd_ab : (gcd x y : β€) = x * gcdA x y + y * gcdB x y := by |
have := @xgcdAux_P x y x y 1 0 0 1 (by simp [P]) (by simp [P])
rwa [xgcdAux_val, xgcd_val] at this
| 1,222 |
import Mathlib.Algebra.Group.Commute.Units
import Mathlib.Algebra.Group.Int
import Mathlib.Algebra.GroupWithZero.Semiconj
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Bounds.Basic
#align_import data.int.gcd from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
namespace Nat
... | Mathlib/Data/Int/GCD.lean | 146 | 154 | theorem exists_mul_emod_eq_gcd {k n : β} (hk : gcd n k < k) : β m, n * m % k = gcd n k := by |
have hk' := Int.ofNat_ne_zero.2 (ne_of_gt (lt_of_le_of_lt (zero_le (gcd n k)) hk))
have key := congr_arg (fun (m : β€) => (m % k).toNat) (gcd_eq_gcd_ab n k)
simp only at key
rw [Int.add_mul_emod_self_left, β Int.natCast_mod, Int.toNat_natCast, mod_eq_of_lt hk] at key
refine β¨(n.gcdA k % k).toNat, Eq.trans (In... | 1,222 |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b :... | Mathlib/Data/Nat/ModEq.lean | 78 | 78 | theorem modEq_zero_iff_dvd : a β‘ 0 [MOD n] β n β£ a := by | rw [ModEq, zero_mod, dvd_iff_mod_eq_zero]
| 1,223 |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b :... | Mathlib/Data/Nat/ModEq.lean | 89 | 91 | theorem modEq_iff_dvd : a β‘ b [MOD n] β (n : β€) β£ b - a := by |
rw [ModEq, eq_comm, β Int.natCast_inj, Int.natCast_mod, Int.natCast_mod,
Int.emod_eq_emod_iff_emod_sub_eq_zero, Int.dvd_iff_emod_eq_zero]
| 1,223 |
import Mathlib.Algebra.Ring.Regular
import Mathlib.Data.Int.GCD
import Mathlib.Data.Int.Order.Lemmas
import Mathlib.Tactic.NormNum.Basic
#align_import data.nat.modeq from "leanprover-community/mathlib"@"47a1a73351de8dd6c8d3d32b569c8e434b03ca47"
assert_not_exists Function.support
namespace Nat
def ModEq (n a b :... | Mathlib/Data/Nat/ModEq.lean | 99 | 100 | theorem modEq_iff_dvd' (h : a β€ b) : a β‘ b [MOD n] β n β£ b - a := by |
rw [modEq_iff_dvd, β Int.natCast_dvd_natCast, Int.ofNat_sub h]
| 1,223 |
import Mathlib.Algebra.Group.Fin
import Mathlib.Algebra.NeZero
import Mathlib.Data.Nat.ModEq
import Mathlib.Data.Fintype.Card
#align_import data.zmod.defs from "leanprover-community/mathlib"@"3a2b5524a138b5d0b818b858b516d4ac8a484b03"
def ZMod : β β Type
| 0 => β€
| n + 1 => Fin (n + 1)
#align zmod ZMod
insta... | Mathlib/Data/ZMod/Defs.lean | 124 | 127 | theorem card (n : β) [Fintype (ZMod n)] : Fintype.card (ZMod n) = n := by |
cases n with
| zero => exact (not_finite (ZMod 0)).elim
| succ n => convert Fintype.card_fin (n + 1) using 2
| 1,224 |
import Mathlib.Data.ULift
import Mathlib.Data.ZMod.Defs
import Mathlib.SetTheory.Cardinal.PartENat
#align_import set_theory.cardinal.finite from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
set_option autoImplicit true
open Cardinal Function
noncomputable section
variable {Ξ± Ξ² : Typ... | Mathlib/SetTheory/Cardinal/Finite.lean | 97 | 98 | theorem card_eq_of_equiv_fin {Ξ± : Type*} {n : β} (f : Ξ± β Fin n) : Nat.card Ξ± = n := by |
simpa only [card_eq_fintype_card, Fintype.card_fin] using card_congr f
| 1,225 |
import Mathlib.Data.ULift
import Mathlib.Data.ZMod.Defs
import Mathlib.SetTheory.Cardinal.PartENat
#align_import set_theory.cardinal.finite from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
set_option autoImplicit true
open Cardinal Function
noncomputable section
variable {Ξ± Ξ² : Typ... | Mathlib/SetTheory/Cardinal/Finite.lean | 144 | 146 | theorem card_of_subsingleton (a : Ξ±) [Subsingleton Ξ±] : Nat.card Ξ± = 1 := by |
letI := Fintype.ofSubsingleton a
rw [card_eq_fintype_card, Fintype.card_ofSubsingleton a]
| 1,225 |
import Mathlib.Data.ULift
import Mathlib.Data.ZMod.Defs
import Mathlib.SetTheory.Cardinal.PartENat
#align_import set_theory.cardinal.finite from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
set_option autoImplicit true
open Cardinal Function
noncomputable section
variable {Ξ± Ξ² : Typ... | Mathlib/SetTheory/Cardinal/Finite.lean | 167 | 170 | theorem card_sum [Finite Ξ±] [Finite Ξ²] : Nat.card (Ξ± β Ξ²) = Nat.card Ξ± + Nat.card Ξ² := by |
have := Fintype.ofFinite Ξ±
have := Fintype.ofFinite Ξ²
simp_rw [Nat.card_eq_fintype_card, Fintype.card_sum]
| 1,225 |
import Mathlib.Data.Finset.Pointwise
import Mathlib.SetTheory.Cardinal.Finite
#align_import combinatorics.additive.ruzsa_covering from "leanprover-community/mathlib"@"b363547b3113d350d053abdf2884e9850a56b205"
open Pointwise
namespace Finset
variable {Ξ± : Type*} [DecidableEq Ξ±] [CommGroup Ξ±] (s : Finset Ξ±) {t : ... | Mathlib/Combinatorics/Additive/RuzsaCovering.lean | 31 | 53 | theorem exists_subset_mul_div (ht : t.Nonempty) :
β u : Finset Ξ±, u.card * t.card β€ (s * t).card β§ s β u * t / t := by |
haveI : β u, Decidable ((u : Set Ξ±).PairwiseDisjoint (Β· β’ t)) := fun u β¦ Classical.dec _
set C := s.powerset.filter fun u β¦ u.toSet.PairwiseDisjoint (Β· β’ t)
obtain β¨u, hu, hCmaxβ© := C.exists_maximal (filter_nonempty_iff.2
β¨β
, empty_mem_powerset _, by rw [coe_empty]; exact Set.pairwiseDisjoint_emptyβ©)
rw [m... | 1,226 |
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Sum
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.fintype.units from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
variable {Ξ± : Type*}
instance UnitsInt.fintype : Fintype β€Λ£ :=
β¨{1, -1}, fun x β¦ by cases Int... | Mathlib/Data/Fintype/Units.lean | 36 | 40 | theorem Fintype.card_eq_card_units_add_one [GroupWithZero Ξ±] [Fintype Ξ±] [DecidableEq Ξ±] :
Fintype.card Ξ± = Fintype.card Ξ±Λ£ + 1 := by |
rw [eq_comm, Fintype.card_congr unitsEquivNeZero]
have := Fintype.card_congr (Equiv.sumCompl (Β· = (0 : Ξ±)))
rwa [Fintype.card_sum, add_comm, Fintype.card_subtype_eq] at this
| 1,227 |
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Sum
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.fintype.units from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
variable {Ξ± : Type*}
instance UnitsInt.fintype : Fintype β€Λ£ :=
β¨{1, -1}, fun x β¦ by cases Int... | Mathlib/Data/Fintype/Units.lean | 42 | 46 | theorem Nat.card_eq_card_units_add_one [GroupWithZero Ξ±] [Finite Ξ±] :
Nat.card Ξ± = Nat.card Ξ±Λ£ + 1 := by |
have : Fintype Ξ± := Fintype.ofFinite Ξ±
classical
rw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card, Fintype.card_eq_card_units_add_one]
| 1,227 |
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Sum
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.fintype.units from "leanprover-community/mathlib"@"509de852e1de55e1efa8eacfa11df0823f26f226"
variable {Ξ± : Type*}
instance UnitsInt.fintype : Fintype β€Λ£ :=
β¨{1, -1}, fun x β¦ by cases Int... | Mathlib/Data/Fintype/Units.lean | 48 | 50 | theorem Fintype.card_units [GroupWithZero Ξ±] [Fintype Ξ±] [DecidableEq Ξ±] :
Fintype.card Ξ±Λ£ = Fintype.card Ξ± - 1 := by |
rw [@Fintype.card_eq_card_units_add_one Ξ±, Nat.add_sub_cancel]
| 1,227 |
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Combinatorics.Hall.Basic
import Mathlib.Data.Fintype.BigOperators
import Mathlib.SetTheory.Cardinal.Finite
#align_import combinatorics.configuration from "leanprover-community/mathlib"@"d2d8742b0c21426362a9dacebc6005db895ca963"
open Finset
nam... | Mathlib/Combinatorics/Configuration.lean | 125 | 166 | theorem Nondegenerate.exists_injective_of_card_le [Nondegenerate P L] [Fintype P] [Fintype L]
(h : Fintype.card L β€ Fintype.card P) : β f : L β P, Function.Injective f β§ β l, f l β l := by |
classical
let t : L β Finset P := fun l => Set.toFinset { p | p β l }
suffices β s : Finset L, s.card β€ (s.biUnion t).card by
-- Hall's marriage theorem
obtain β¨f, hf1, hf2β© := (Finset.all_card_le_biUnion_card_iff_exists_injective t).mp this
exact β¨f, hf1, fun l => Set.mem_toFinset.mp (hf2 ... | 1,228 |
import Mathlib.Algebra.Quotient
import Mathlib.Algebra.Group.Subgroup.Actions
import Mathlib.Algebra.Group.Subgroup.MulOpposite
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.SetTheory.Cardinal.Finite
#align_import group_theory.coset from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce4... | Mathlib/GroupTheory/Coset.lean | 105 | 106 | theorem leftCoset_assoc (s : Set Ξ±) (a b : Ξ±) : a β’ (b β’ s) = (a * b) β’ s := by |
simp [β image_smul, (image_comp _ _ _).symm, Function.comp, mul_assoc]
| 1,229 |
import Mathlib.Algebra.Quotient
import Mathlib.Algebra.Group.Subgroup.Actions
import Mathlib.Algebra.Group.Subgroup.MulOpposite
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.SetTheory.Cardinal.Finite
#align_import group_theory.coset from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce4... | Mathlib/GroupTheory/Coset.lean | 111 | 112 | theorem rightCoset_assoc (s : Set Ξ±) (a b : Ξ±) : op b β’ op a β’ s = op (a * b) β’ s := by |
simp [β image_smul, (image_comp _ _ _).symm, Function.comp, mul_assoc]
| 1,229 |
import Mathlib.Algebra.Quotient
import Mathlib.Algebra.Group.Subgroup.Actions
import Mathlib.Algebra.Group.Subgroup.MulOpposite
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.SetTheory.Cardinal.Finite
#align_import group_theory.coset from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce4... | Mathlib/GroupTheory/Coset.lean | 117 | 118 | theorem leftCoset_rightCoset (s : Set Ξ±) (a b : Ξ±) : op b β’ a β’ s = a β’ (op b β’ s) := by |
simp [β image_smul, (image_comp _ _ _).symm, Function.comp, mul_assoc]
| 1,229 |
import Mathlib.Algebra.Quotient
import Mathlib.Algebra.Group.Subgroup.Actions
import Mathlib.Algebra.Group.Subgroup.MulOpposite
import Mathlib.GroupTheory.GroupAction.Basic
import Mathlib.SetTheory.Cardinal.Finite
#align_import group_theory.coset from "leanprover-community/mathlib"@"f7fc89d5d5ff1db2d1242c7bb0e9062ce4... | Mathlib/GroupTheory/Coset.lean | 302 | 308 | theorem leftRel_apply {x y : Ξ±} : @Setoid.r _ (leftRel s) x y β xβ»ΒΉ * y β s :=
calc
(β a : s.op, y * MulOpposite.unop a = x) β β a : s, y * a = x :=
s.equivOp.symm.exists_congr_left
_ β β a : s, xβ»ΒΉ * y = aβ»ΒΉ := by |
simp only [inv_mul_eq_iff_eq_mul, Subgroup.coe_inv, eq_mul_inv_iff_mul_eq]
_ β xβ»ΒΉ * y β s := by simp [exists_inv_mem_iff_exists_mem]
| 1,229 |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 77 | 82 | theorem _root_.List.periodic_prod [Add Ξ±] [Monoid Ξ²] (l : List (Ξ± β Ξ²))
(hl : β f β l, Periodic f c) : Periodic l.prod c := by |
induction' l with g l ih hl
Β· simp
Β· rw [List.forall_mem_cons] at hl
simpa only [List.prod_cons] using hl.1.mul (ih hl.2)
| 1,230 |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 123 | 125 | theorem Periodic.const_inv_smul [AddMonoid Ξ±] [Group Ξ³] [DistribMulAction Ξ³ Ξ±] (h : Periodic f c)
(a : Ξ³) : Periodic (fun x => f (aβ»ΒΉ β’ x)) (a β’ c) := by |
simpa only [inv_inv] using h.const_smul aβ»ΒΉ
| 1,230 |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 128 | 130 | theorem Periodic.const_inv_smulβ [AddCommMonoid Ξ±] [DivisionSemiring Ξ³] [Module Ξ³ Ξ±]
(h : Periodic f c) (a : Ξ³) : Periodic (fun x => f (aβ»ΒΉ β’ x)) (a β’ c) := by |
simpa only [inv_inv] using h.const_smulβ aβ»ΒΉ
| 1,230 |
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Group.Subgroup.ZPowers
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Algebra.Ring.NegOnePow
import Mathlib.Algebra.Order.Archimedean
import Mathlib.GroupTheory.Coset
#align_import algebra.periodic from "leanprover-community/mathlib"@"3041... | Mathlib/Algebra/Periodic.lean | 143 | 144 | theorem Periodic.mul_const' [DivisionSemiring Ξ±] (h : Periodic f c) (a : Ξ±) :
Periodic (fun x => f (x * a)) (c / a) := by | simpa only [div_eq_mul_inv] using h.mul_const a
| 1,230 |
import Mathlib.Algebra.Periodic
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Nat
open Nat Function
| Mathlib/Data/Nat/Periodic.lean | 25 | 26 | theorem periodic_gcd (a : β) : Periodic (gcd a) a := by |
simp only [forall_const, gcd_add_self_right, eq_self_iff_true, Periodic]
| 1,231 |
import Mathlib.Algebra.Periodic
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Nat
open Nat Function
theorem periodic_gcd (a : β) : P... | Mathlib/Data/Nat/Periodic.lean | 29 | 30 | theorem periodic_coprime (a : β) : Periodic (Coprime a) a := by |
simp only [coprime_add_self_right, forall_const, iff_self_iff, eq_iff_iff, Periodic]
| 1,231 |
import Mathlib.Algebra.Periodic
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Nat
open Nat Function
theorem periodic_gcd (a : β) : P... | Mathlib/Data/Nat/Periodic.lean | 33 | 34 | theorem periodic_mod (a : β) : Periodic (fun n => n % a) a := by |
simp only [forall_const, eq_self_iff_true, add_mod_right, Periodic]
| 1,231 |
import Mathlib.Algebra.Periodic
import Mathlib.Data.Nat.Count
import Mathlib.Data.Nat.GCD.Basic
import Mathlib.Order.Interval.Finset.Nat
#align_import data.nat.periodic from "leanprover-community/mathlib"@"dc6c365e751e34d100e80fe6e314c3c3e0fd2988"
namespace Nat
open Nat Function
theorem periodic_gcd (a : β) : P... | Mathlib/Data/Nat/Periodic.lean | 48 | 54 | theorem filter_multiset_Ico_card_eq_of_periodic (n a : β) (p : β β Prop) [DecidablePred p]
(pp : Periodic p a) : card (filter p (Ico n (n + a))) = a.count p := by |
rw [count_eq_card_filter_range, Finset.card, Finset.filter_val, Finset.range_val, β
multiset_Ico_map_mod n, β map_count_True_eq_filter_card, β map_count_True_eq_filter_card,
map_map]
congr; funext n
exact (Function.Periodic.map_mod_nat pp n).symm
| 1,231 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 49 | 54 | theorem Nat.card_eq (Ξ± : Type*) :
Nat.card Ξ± = if h : Finite Ξ± then @Fintype.card Ξ± (Fintype.ofFinite Ξ±) else 0 := by |
cases finite_or_infinite Ξ±
Β· letI := Fintype.ofFinite Ξ±
simp only [*, Nat.card_eq_fintype_card, dif_pos]
Β· simp only [*, card_eq_zero_of_infinite, not_finite_iff_infinite.mpr, dite_false]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 57 | 59 | theorem Finite.card_pos_iff [Finite Ξ±] : 0 < Nat.card Ξ± β Nonempty Ξ± := by |
haveI := Fintype.ofFinite Ξ±
rw [Nat.card_eq_fintype_card, Fintype.card_pos_iff]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 72 | 75 | theorem card_eq [Finite Ξ±] [Finite Ξ²] : Nat.card Ξ± = Nat.card Ξ² β Nonempty (Ξ± β Ξ²) := by |
haveI := Fintype.ofFinite Ξ±
haveI := Fintype.ofFinite Ξ²
simp only [Nat.card_eq_fintype_card, Fintype.card_eq]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 78 | 80 | theorem card_le_one_iff_subsingleton [Finite Ξ±] : Nat.card Ξ± β€ 1 β Subsingleton Ξ± := by |
haveI := Fintype.ofFinite Ξ±
simp only [Nat.card_eq_fintype_card, Fintype.card_le_one_iff_subsingleton]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 83 | 85 | theorem one_lt_card_iff_nontrivial [Finite Ξ±] : 1 < Nat.card Ξ± β Nontrivial Ξ± := by |
haveI := Fintype.ofFinite Ξ±
simp only [Nat.card_eq_fintype_card, Fintype.one_lt_card_iff_nontrivial]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 93 | 95 | theorem card_option [Finite Ξ±] : Nat.card (Option Ξ±) = Nat.card Ξ± + 1 := by |
haveI := Fintype.ofFinite Ξ±
simp only [Nat.card_eq_fintype_card, Fintype.card_option]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 98 | 102 | theorem card_le_of_injective [Finite Ξ²] (f : Ξ± β Ξ²) (hf : Function.Injective f) :
Nat.card Ξ± β€ Nat.card Ξ² := by |
haveI := Fintype.ofFinite Ξ²
haveI := Fintype.ofInjective f hf
simpa only [Nat.card_eq_fintype_card, ge_iff_le] using Fintype.card_le_of_injective f hf
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 109 | 113 | theorem card_le_of_surjective [Finite Ξ±] (f : Ξ± β Ξ²) (hf : Function.Surjective f) :
Nat.card Ξ² β€ Nat.card Ξ± := by |
haveI := Fintype.ofFinite Ξ±
haveI := Fintype.ofSurjective f hf
simpa only [Nat.card_eq_fintype_card, ge_iff_le] using Fintype.card_le_of_surjective f hf
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 116 | 118 | theorem card_eq_zero_iff [Finite Ξ±] : Nat.card Ξ± = 0 β IsEmpty Ξ± := by |
haveI := Fintype.ofFinite Ξ±
simp only [Nat.card_eq_fintype_card, Fintype.card_eq_zero_iff]
| 1,232 |
import Mathlib.SetTheory.Cardinal.Finite
#align_import data.finite.card from "leanprover-community/mathlib"@"3ff3f2d6a3118b8711063de7111a0d77a53219a8"
noncomputable section
open scoped Classical
variable {Ξ± Ξ² Ξ³ : Type*}
def Finite.equivFin (Ξ± : Type*) [Finite Ξ±] : Ξ± β Fin (Nat.card Ξ±) := by
have := (Finite.... | Mathlib/Data/Finite/Card.lean | 145 | 152 | theorem card_eq_zero_of_surjective {f : Ξ± β Ξ²} (hf : Function.Surjective f) (h : Nat.card Ξ² = 0) :
Nat.card Ξ± = 0 := by |
cases finite_or_infinite Ξ²
Β· haveI := card_eq_zero_iff.mp h
haveI := Function.isEmpty f
exact Nat.card_of_isEmpty
Β· haveI := Infinite.of_surjective f hf
exact Nat.card_eq_zero_of_infinite
| 1,232 |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finite.Card
#align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
variable {G : Type*} [Group G]
variable {A : Type*} [AddGroup A]
... | Mathlib/Algebra/Group/Subgroup/Finite.lean | 127 | 137 | theorem eq_top_of_card_eq [Finite H] (h : Nat.card H = Nat.card G) :
H = β€ := by |
have : Nonempty H := β¨1, one_mem Hβ©
have h' : Nat.card H β 0 := Nat.card_pos.ne'
have : Finite G := (Nat.finite_of_card_ne_zero (h βΈ h'))
have : Fintype G := Fintype.ofFinite G
have : Fintype H := Fintype.ofFinite H
rw [Nat.card_eq_fintype_card, Nat.card_eq_fintype_card] at h
rw [SetLike.ext'_iff, coe_to... | 1,233 |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finite.Card
#align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
variable {G : Type*} [Group G]
variable {A : Type*} [AddGroup A]
n... | Mathlib/Algebra/Group/Subgroup/Finite.lean | 195 | 226 | theorem pi_mem_of_mulSingle_mem_aux [DecidableEq Ξ·] (I : Finset Ξ·) {H : Subgroup (β i, f i)}
(x : β i, f i) (h1 : β i, i β I β x i = 1) (h2 : β i, i β I β Pi.mulSingle i (x i) β H) :
x β H := by |
induction' I using Finset.induction_on with i I hnmem ih generalizing x
Β· convert one_mem H
ext i
exact h1 i (Finset.not_mem_empty i)
Β· have : x = Function.update x i 1 * Pi.mulSingle i (x i) := by
ext j
by_cases heq : j = i
Β· subst heq
simp
Β· simp [heq]
rw [this]
... | 1,233 |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finite.Card
#align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
variable {G : Type*} [Group G]
variable {A : Type*} [AddGroup A]
n... | Mathlib/Algebra/Group/Subgroup/Finite.lean | 231 | 234 | theorem pi_mem_of_mulSingle_mem [Finite Ξ·] [DecidableEq Ξ·] {H : Subgroup (β i, f i)} (x : β i, f i)
(h : β i, Pi.mulSingle i (x i) β H) : x β H := by |
cases nonempty_fintype Ξ·
exact pi_mem_of_mulSingle_mem_aux Finset.univ x (by simp) fun i _ => h i
| 1,233 |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finite.Card
#align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
variable {G : Type*} [Group G]
variable {A : Type*} [AddGroup A]
n... | Mathlib/Algebra/Group/Subgroup/Finite.lean | 241 | 247 | theorem pi_le_iff [DecidableEq Ξ·] [Finite Ξ·] {H : β i, Subgroup (f i)} {J : Subgroup (β i, f i)} :
pi univ H β€ J β β i : Ξ·, map (MonoidHom.mulSingle f i) (H i) β€ J := by |
constructor
Β· rintro h i _ β¨x, hx, rflβ©
apply h
simpa using hx
Β· exact fun h x hx => pi_mem_of_mulSingle_mem x fun i => h i (mem_map_of_mem _ (hx i trivial))
| 1,233 |
import Mathlib.Algebra.Group.Subgroup.Basic
import Mathlib.Algebra.Group.Submonoid.Membership
import Mathlib.Data.Finite.Card
#align_import group_theory.subgroup.finite from "leanprover-community/mathlib"@"f93c11933efbc3c2f0299e47b8ff83e9b539cbf6"
variable {G : Type*} [Group G]
variable {A : Type*} [AddGroup A]
n... | Mathlib/Algebra/Group/Subgroup/Finite.lean | 259 | 270 | theorem mem_normalizer_fintype {S : Set G} [Finite S] {x : G} (h : β n, n β S β x * n * xβ»ΒΉ β S) :
x β Subgroup.setNormalizer S := by |
haveI := Classical.propDecidable; cases nonempty_fintype S;
haveI := Set.fintypeImage S fun n => x * n * xβ»ΒΉ;
exact fun n =>
β¨h n, fun hβ =>
have heq : (fun n => x * n * xβ»ΒΉ) '' S = S :=
Set.eq_of_subset_of_card_le (fun n β¨y, hyβ© => hy.2 βΈ h y hy.1)
(by rw [Set.card_imag... | 1,233 |
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fin
import Mathlib.Tactic.NormNum.Ineq
#align_import group_theory.perm.sign from "leanprover-community/math... | Mathlib/GroupTheory/Perm/Sign.lean | 99 | 110 | theorem swap_induction_on [Finite Ξ±] {P : Perm Ξ± β Prop} (f : Perm Ξ±) :
P 1 β (β f x y, x β y β P f β P (swap x y * f)) β P f := by |
cases nonempty_fintype Ξ±
cases' (truncSwapFactors f).out with l hl
induction' l with g l ih generalizing f
Β· simp (config := { contextual := true }) only [hl.left.symm, List.prod_nil, forall_true_iff]
Β· intro h1 hmul_swap
rcases hl.2 g (by simp) with β¨x, y, hxyβ©
rw [β hl.1, List.prod_cons, hxy.2]
... | 1,234 |
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fin
import Mathlib.Tactic.NormNum.Ineq
#align_import group_theory.perm.sign from "leanprover-community/math... | Mathlib/GroupTheory/Perm/Sign.lean | 113 | 118 | theorem closure_isSwap [Finite Ξ±] : Subgroup.closure { Ο : Perm Ξ± | IsSwap Ο } = β€ := by |
cases nonempty_fintype Ξ±
refine eq_top_iff.mpr fun x _ => ?_
obtain β¨h1, h2β© := Subtype.mem (truncSwapFactors x).out
rw [β h1]
exact Subgroup.list_prod_mem _ fun y hy => Subgroup.subset_closure (h2 y hy)
| 1,234 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {Ξ± Ξ² : Type*} [Fintype Ξ±] [DecidableEq Ξ²] (e : Equiv.Perm Ξ±) (f : Ξ± βͺ Ξ²)
... | Mathlib/Logic/Equiv/Fintype.lean | 50 | 51 | theorem Function.Embedding.toEquivRange_symm_apply_self (a : Ξ±) :
f.toEquivRange.symm β¨f a, Set.mem_range_self aβ© = a := by | simp [Equiv.symm_apply_eq]
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {Ξ± Ξ² : Type*} [Fintype Ξ±] [DecidableEq Ξ²] (e : Equiv.Perm Ξ±) (f : Ξ± βͺ Ξ²)
... | Mathlib/Logic/Equiv/Fintype.lean | 54 | 57 | theorem Function.Embedding.toEquivRange_eq_ofInjective :
f.toEquivRange = Equiv.ofInjective f f.injective := by |
ext
simp
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {Ξ± Ξ² : Type*} [Fintype Ξ±] [DecidableEq Ξ²] (e : Equiv.Perm Ξ±) (f : Ξ± βͺ Ξ²)
... | Mathlib/Logic/Equiv/Fintype.lean | 72 | 75 | theorem Equiv.Perm.viaFintypeEmbedding_apply_image (a : Ξ±) :
e.viaFintypeEmbedding f (f a) = f (e a) := by |
rw [Equiv.Perm.viaFintypeEmbedding]
convert Equiv.Perm.extendDomain_apply_image e (Function.Embedding.toEquivRange f) a
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {Ξ± Ξ² : Type*} [Fintype Ξ±] [DecidableEq Ξ²] (e : Equiv.Perm Ξ±) (f : Ξ± βͺ Ξ²)
... | Mathlib/Logic/Equiv/Fintype.lean | 78 | 82 | theorem Equiv.Perm.viaFintypeEmbedding_apply_mem_range {b : Ξ²} (h : b β Set.range f) :
e.viaFintypeEmbedding f b = f (e (f.invOfMemRange β¨b, hβ©)) := by |
simp only [viaFintypeEmbedding, Function.Embedding.invOfMemRange]
rw [Equiv.Perm.extendDomain_apply_subtype]
congr
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {Ξ± Ξ² : Type*} [Fintype Ξ±] [DecidableEq Ξ²] (e : Equiv.Perm Ξ±) (f : Ξ± βͺ Ξ²)
... | Mathlib/Logic/Equiv/Fintype.lean | 85 | 87 | theorem Equiv.Perm.viaFintypeEmbedding_apply_not_mem_range {b : Ξ²} (h : b β Set.range f) :
e.viaFintypeEmbedding f b = b := by |
rwa [Equiv.Perm.viaFintypeEmbedding, Equiv.Perm.extendDomain_apply_not_subtype]
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
section Fintype
variable {Ξ± Ξ² : Type*} [Fintype Ξ±] [DecidableEq Ξ²] (e : Equiv.Perm Ξ±) (f : Ξ± βͺ Ξ²)
... | Mathlib/Logic/Equiv/Fintype.lean | 91 | 93 | theorem Equiv.Perm.viaFintypeEmbedding_sign [DecidableEq Ξ±] [Fintype Ξ²] :
Equiv.Perm.sign (e.viaFintypeEmbedding f) = Equiv.Perm.sign e := by |
simp [Equiv.Perm.viaFintypeEmbedding]
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
namespace Equiv
variable {Ξ± Ξ² : Type*} [Finite Ξ±]
noncomputable def toCompl {p q : Ξ± β Prop} (e ... | Mathlib/Logic/Equiv/Fintype.lean | 125 | 129 | theorem extendSubtype_apply_of_mem (e : { x // p x } β { x // q x }) (x) (hx : p x) :
e.extendSubtype x = e β¨x, hxβ© := by |
dsimp only [extendSubtype]
simp only [subtypeCongr, Equiv.trans_apply, Equiv.sumCongr_apply]
rw [sumCompl_apply_symm_of_pos _ _ hx, Sum.map_inl, sumCompl_apply_inl]
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
namespace Equiv
variable {Ξ± Ξ² : Type*} [Finite Ξ±]
noncomputable def toCompl {p q : Ξ± β Prop} (e ... | Mathlib/Logic/Equiv/Fintype.lean | 132 | 135 | theorem extendSubtype_mem (e : { x // p x } β { x // q x }) (x) (hx : p x) :
q (e.extendSubtype x) := by |
convert (e β¨x, hxβ©).2
rw [e.extendSubtype_apply_of_mem _ hx]
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
namespace Equiv
variable {Ξ± Ξ² : Type*} [Finite Ξ±]
noncomputable def toCompl {p q : Ξ± β Prop} (e ... | Mathlib/Logic/Equiv/Fintype.lean | 138 | 142 | theorem extendSubtype_apply_of_not_mem (e : { x // p x } β { x // q x }) (x) (hx : Β¬p x) :
e.extendSubtype x = e.toCompl β¨x, hxβ© := by |
dsimp only [extendSubtype]
simp only [subtypeCongr, Equiv.trans_apply, Equiv.sumCongr_apply]
rw [sumCompl_apply_symm_of_neg _ _ hx, Sum.map_inr, sumCompl_apply_inr]
| 1,235 |
import Mathlib.Data.Fintype.Basic
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Defs
#align_import logic.equiv.fintype from "leanprover-community/mathlib"@"9407b03373c8cd201df99d6bc5514fc2db44054f"
namespace Equiv
variable {Ξ± Ξ² : Type*} [Finite Ξ±]
noncomputable def toCompl {p q : Ξ± β Prop} (e ... | Mathlib/Logic/Equiv/Fintype.lean | 145 | 148 | theorem extendSubtype_not_mem (e : { x // p x } β { x // q x }) (x) (hx : Β¬p x) :
Β¬q (e.extendSubtype x) := by |
convert (e.toCompl β¨x, hxβ©).2
rw [e.extendSubtype_apply_of_not_mem _ hx]
| 1,235 |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Sort
import Mathlib.Data.List.FinRange
import Mathlib.LinearAlgebra.Pi
import Mathlib.Logic.Equiv.Fintype
#align_import linear_algebra.multilinear.basic from ... | Mathlib/LinearAlgebra/Multilinear/Basic.lean | 171 | 174 | theorem map_coord_zero {m : β i, Mβ i} (i : ΞΉ) (h : m i = 0) : f m = 0 := by |
classical
have : (0 : R) β’ (0 : Mβ i) = 0 := by simp
rw [β update_eq_self i m, h, β this, f.map_smul, zero_smul R (M := Mβ)]
| 1,236 |
import Mathlib.Algebra.Algebra.Defs
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Sort
import Mathlib.Data.List.FinRange
import Mathlib.LinearAlgebra.Pi
import Mathlib.Logic.Equiv.Fintype
#align_import linear_algebra.multilinear.basic from ... | Mathlib/LinearAlgebra/Multilinear/Basic.lean | 183 | 185 | theorem map_zero [Nonempty ΞΉ] : f 0 = 0 := by |
obtain β¨i, _β© : β i : ΞΉ, i β Set.univ := Set.exists_mem_of_nonempty ΞΉ
exact map_coord_zero f i rfl
| 1,236 |
import Mathlib.Topology.Algebra.Module.Basic
import Mathlib.LinearAlgebra.Multilinear.Basic
#align_import topology.algebra.module.multilinear from "leanprover-community/mathlib"@"f40476639bac089693a489c9e354ebd75dc0f886"
open Function Fin Set
universe u v w wβ wβ' wβ wβ wβ
variable {R : Type u} {ΞΉ : Type v} {n ... | Mathlib/Topology/Algebra/Module/Multilinear/Basic.lean | 113 | 114 | theorem ext_iff {f f' : ContinuousMultilinearMap R Mβ Mβ} : f = f' β β x, f x = f' x := by |
rw [β toMultilinearMap_injective.eq_iff, MultilinearMap.ext_iff]; rfl
| 1,237 |
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 37 | 50 | theorem isConj_of_support_equiv
(f : { x // x β (Ο.support : Set Ξ±) } β { x // x β (Ο.support : Set Ξ±) })
(hf : β (x : Ξ±) (hx : x β (Ο.support : Set Ξ±)),
(f β¨Ο x, apply_mem_support.2 hxβ© : Ξ±) = Ο β(f β¨x, hxβ©)) :
IsConj Ο Ο := by |
refine isConj_iff.2 β¨Equiv.extendSubtype f, ?_β©
rw [mul_inv_eq_iff_eq_mul]
ext x
simp only [Perm.mul_apply]
by_cases hx : x β Ο.support
Β· rw [Equiv.extendSubtype_apply_of_mem, Equiv.extendSubtype_apply_of_mem]
Β· exact hf x (Finset.mem_coe.2 hx)
Β· rwa [Classical.not_not.1 ((not_congr mem_support).1 (E... | 1,238 |
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 57 | 65 | theorem perm_inv_on_of_perm_on_finset {s : Finset Ξ±} {f : Perm Ξ±} (h : β x β s, f x β s) {y : Ξ±}
(hy : y β s) : fβ»ΒΉ y β s := by |
have h0 : β y β s, β (x : _) (hx : x β s), y = (fun i (_ : i β s) => f i) x hx :=
Finset.surj_on_of_inj_on_of_card_le (fun x hx => (fun i _ => f i) x hx) (fun a ha => h a ha)
(fun aβ aβ haβ haβ heq => (Equiv.apply_eq_iff_eq f).mp heq) rfl.ge
obtain β¨y2, hy2, heqβ© := h0 y hy
convert hy2
rw [heq]
sim... | 1,238 |
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 68 | 75 | theorem perm_inv_mapsTo_of_mapsTo (f : Perm Ξ±) {s : Set Ξ±} [Finite s] (h : Set.MapsTo f s s) :
Set.MapsTo (fβ»ΒΉ : _) s s := by |
cases nonempty_fintype s
exact fun x hx =>
Set.mem_toFinset.mp <|
perm_inv_on_of_perm_on_finset
(fun a ha => Set.mem_toFinset.mpr (h (Set.mem_toFinset.mp ha)))
(Set.mem_toFinset.mpr hx)
| 1,238 |
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 111 | 129 | theorem perm_mapsTo_inl_iff_mapsTo_inr {m n : Type*} [Finite m] [Finite n] (Ο : Perm (Sum m n)) :
Set.MapsTo Ο (Set.range Sum.inl) (Set.range Sum.inl) β
Set.MapsTo Ο (Set.range Sum.inr) (Set.range Sum.inr) := by |
constructor <;>
( intro h
classical
rw [β perm_inv_mapsTo_iff_mapsTo] at h
intro x
cases' hx : Ο x with l r)
Β· rintro β¨a, rflβ©
obtain β¨y, hyβ© := h β¨l, rflβ©
rw [β hx, Ο.inv_apply_self] at hy
exact absurd hy Sum.inl_ne_inr
Β· rintro _; exact β¨r, rflβ©
Β· rintro _; exact... | 1,238 |
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Int.Order.Units
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.Perm.Support
import Mathlib.Logic.Equiv.Fintype
#align_import group_theory.perm.sign from "leanprover-community/mathlib"@"f694c7dead66f5d4c80f446c796a5aad14707f0e"
universe u v
o... | Mathlib/GroupTheory/Perm/Finite.lean | 132 | 163 | theorem mem_sumCongrHom_range_of_perm_mapsTo_inl {m n : Type*} [Finite m] [Finite n]
{Ο : Perm (Sum m n)} (h : Set.MapsTo Ο (Set.range Sum.inl) (Set.range Sum.inl)) :
Ο β (sumCongrHom m n).range := by |
classical
have h1 : β x : Sum m n, (β a : m, Sum.inl a = x) β β a : m, Sum.inl a = Ο x := by
rintro x β¨a, haβ©
apply h
rw [β ha]
exact β¨a, rflβ©
have h3 : β x : Sum m n, (β b : n, Sum.inr b = x) β β b : n, Sum.inr b = Ο x := by
rintro x β¨b, hbβ©
apply (perm_mapsTo_inl_iff_map... | 1,238 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 90 | 90 | theorem sameCycle_one : SameCycle 1 x y β x = y := by | simp [SameCycle]
| 1,239 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 107 | 108 | theorem SameCycle.conj : SameCycle f x y β SameCycle (g * f * gβ»ΒΉ) (g x) (g y) := by |
simp [sameCycle_conj]
| 1,239 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 132 | 133 | theorem sameCycle_apply_right : SameCycle f x (f y) β SameCycle f x y := by |
rw [sameCycle_comm, sameCycle_apply_left, sameCycle_comm]
| 1,239 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 137 | 138 | theorem sameCycle_inv_apply_left : SameCycle f (fβ»ΒΉ x) y β SameCycle f x y := by |
rw [β sameCycle_apply_left, apply_inv_self]
| 1,239 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 142 | 143 | theorem sameCycle_inv_apply_right : SameCycle f x (fβ»ΒΉ y) β SameCycle f x y := by |
rw [β sameCycle_apply_right, apply_inv_self]
| 1,239 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 152 | 153 | theorem sameCycle_zpow_right {n : β€} : SameCycle f x ((f ^ n) y) β SameCycle f x y := by |
rw [sameCycle_comm, sameCycle_zpow_left, sameCycle_comm]
| 1,239 |
import Mathlib.Algebra.Module.BigOperators
import Mathlib.Data.Fintype.Perm
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {... | Mathlib/GroupTheory/Perm/Cycle/Basic.lean | 157 | 158 | theorem sameCycle_pow_left {n : β} : SameCycle f ((f ^ n) x) y β SameCycle f x y := by |
rw [β zpow_natCast, sameCycle_zpow_left]
| 1,239 |
import Mathlib.GroupTheory.Perm.Cycle.Basic
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {ΞΉ Ξ± Ξ² : Type*}
namespace Equiv.Perm
section Generation
variable [Finite Ξ²]
open Subgroup
| Mathlib/GroupTheory/Perm/Closure.lean | 37 | 41 | theorem closure_isCycle : closure { Ο : Perm Ξ² | IsCycle Ο } = β€ := by |
classical
cases nonempty_fintype Ξ²
exact
top_le_iff.mp (le_trans (ge_of_eq closure_isSwap) (closure_mono fun _ => IsSwap.isCycle))
| 1,240 |
import Mathlib.GroupTheory.Perm.Cycle.Basic
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {ΞΉ Ξ± Ξ² : Type*}
namespace Equiv.Perm
section Generation
variable [Finite Ξ²]
open Subgroup
theorem closure... | Mathlib/GroupTheory/Perm/Closure.lean | 46 | 93 | theorem closure_cycle_adjacent_swap {Ο : Perm Ξ±} (h1 : IsCycle Ο) (h2 : Ο.support = β€) (x : Ξ±) :
closure ({Ο, swap x (Ο x)} : Set (Perm Ξ±)) = β€ := by |
let H := closure ({Ο, swap x (Ο x)} : Set (Perm Ξ±))
have h3 : Ο β H := subset_closure (Set.mem_insert Ο _)
have h4 : swap x (Ο x) β H := subset_closure (Set.mem_insert_of_mem _ (Set.mem_singleton _))
have step1 : β n : β, swap ((Ο ^ n) x) ((Ο ^ (n + 1) : Perm Ξ±) x) β H := by
intro n
induction' n with n... | 1,240 |
import Mathlib.GroupTheory.Perm.Cycle.Basic
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {ΞΉ Ξ± Ξ² : Type*}
namespace Equiv.Perm
section Generation
variable [Finite Ξ²]
open Subgroup
theorem closure... | Mathlib/GroupTheory/Perm/Closure.lean | 96 | 108 | theorem closure_cycle_coprime_swap {n : β} {Ο : Perm Ξ±} (h0 : Nat.Coprime n (Fintype.card Ξ±))
(h1 : IsCycle Ο) (h2 : Ο.support = Finset.univ) (x : Ξ±) :
closure ({Ο, swap x ((Ο ^ n) x)} : Set (Perm Ξ±)) = β€ := by |
rw [β Finset.card_univ, β h2, β h1.orderOf] at h0
cases' exists_pow_eq_self_of_coprime h0 with m hm
have h2' : (Ο ^ n).support = β€ := Eq.trans (support_pow_coprime h0) h2
have h1' : IsCycle ((Ο ^ n) ^ (m : β€)) := by rwa [β hm] at h1
replace h1' : IsCycle (Ο ^ n) :=
h1'.of_pow (le_trans (support_pow_le Ο ... | 1,240 |
import Mathlib.GroupTheory.Perm.Cycle.Basic
#align_import group_theory.perm.cycle.basic from "leanprover-community/mathlib"@"e8638a0fcaf73e4500469f368ef9494e495099b3"
open Equiv Function Finset
variable {ΞΉ Ξ± Ξ² : Type*}
namespace Equiv.Perm
section Generation
variable [Finite Ξ²]
open Subgroup
theorem closure... | Mathlib/GroupTheory/Perm/Closure.lean | 111 | 122 | theorem closure_prime_cycle_swap {Ο Ο : Perm Ξ±} (h0 : (Fintype.card Ξ±).Prime) (h1 : IsCycle Ο)
(h2 : Ο.support = Finset.univ) (h3 : IsSwap Ο) : closure ({Ο, Ο} : Set (Perm Ξ±)) = β€ := by |
obtain β¨x, y, h4, h5β© := h3
obtain β¨i, hiβ© :=
h1.exists_pow_eq (mem_support.mp ((Finset.ext_iff.mp h2 x).mpr (Finset.mem_univ x)))
(mem_support.mp ((Finset.ext_iff.mp h2 y).mpr (Finset.mem_univ y)))
rw [h5, β hi]
refine closure_cycle_coprime_swap
(Nat.Coprime.symm (h0.coprime_iff_not_dvd.mpr fun ... | 1,240 |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Prod
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Option
#align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open Equiv
@[simp]
theo... | Mathlib/GroupTheory/Perm/Option.lean | 27 | 34 | theorem Equiv.optionCongr_swap {Ξ± : Type*} [DecidableEq Ξ±] (x y : Ξ±) :
optionCongr (swap x y) = swap (some x) (some y) := by |
ext (_ | i)
Β· simp [swap_apply_of_ne_of_ne]
Β· by_cases hx : i = x
Β· simp only [hx, optionCongr_apply, Option.map_some', swap_apply_left, Option.mem_def,
Option.some.injEq]
by_cases hy : i = y <;> simp [hx, hy, swap_apply_of_ne_of_ne]
| 1,241 |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Prod
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Option
#align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open Equiv
@[simp]
theo... | Mathlib/GroupTheory/Perm/Option.lean | 38 | 43 | theorem Equiv.optionCongr_sign {Ξ± : Type*} [DecidableEq Ξ±] [Fintype Ξ±] (e : Perm Ξ±) :
Perm.sign e.optionCongr = Perm.sign e := by |
refine Perm.swap_induction_on e ?_ ?_
Β· simp [Perm.one_def]
Β· intro f x y hne h
simp [h, hne, Perm.mul_def, β Equiv.optionCongr_trans]
| 1,241 |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Prod
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Option
#align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open Equiv
@[simp]
theo... | Mathlib/GroupTheory/Perm/Option.lean | 47 | 58 | theorem map_equiv_removeNone {Ξ± : Type*} [DecidableEq Ξ±] (Ο : Perm (Option Ξ±)) :
(removeNone Ο).optionCongr = swap none (Ο none) * Ο := by |
ext1 x
have : Option.map (β(removeNone Ο)) x = (swap none (Ο none)) (Ο x) := by
cases' x with x
Β· simp
Β· cases h : Ο (some _)
Β· simp [removeNone_none _ h]
Β· have hn : Ο (some x) β none := by simp [h]
have hΟn : Ο (some x) β Ο none := Ο.injective.ne (by simp)
simp [removeNone... | 1,241 |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Prod
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Option
#align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open Equiv
@[simp]
theo... | Mathlib/GroupTheory/Perm/Option.lean | 76 | 77 | theorem Equiv.Perm.decomposeOption_symm_of_none_apply {Ξ± : Type*} [DecidableEq Ξ±] (e : Perm Ξ±)
(i : Option Ξ±) : Equiv.Perm.decomposeOption.symm (none, e) i = i.map e := by | simp
| 1,241 |
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Prod
import Mathlib.GroupTheory.Perm.Sign
import Mathlib.Logic.Equiv.Option
#align_import group_theory.perm.option from "leanprover-community/mathlib"@"c3019c79074b0619edb4b27553a91b2e82242395"
open Equiv
@[simp]
theo... | Mathlib/GroupTheory/Perm/Option.lean | 80 | 81 | theorem Equiv.Perm.decomposeOption_symm_sign {Ξ± : Type*} [DecidableEq Ξ±] [Fintype Ξ±] (e : Perm Ξ±) :
Perm.sign (Equiv.Perm.decomposeOption.symm (none, e)) = Perm.sign e := by | simp
| 1,241 |
import Mathlib.Algebra.Group.Commutator
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Bracket
import Mathlib.GroupTheory.Subgroup.Centralizer
import Mathlib.Tactic.Group
#align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
variable... | Mathlib/GroupTheory/Commutator.lean | 31 | 32 | theorem commutatorElement_eq_one_iff_mul_comm : β
gβ, gββ = 1 β gβ * gβ = gβ * gβ := by |
rw [commutatorElement_def, mul_inv_eq_one, mul_inv_eq_iff_eq_mul]
| 1,242 |
import Mathlib.Algebra.Group.Commutator
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Bracket
import Mathlib.GroupTheory.Subgroup.Centralizer
import Mathlib.Tactic.Group
#align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
variable... | Mathlib/GroupTheory/Commutator.lean | 61 | 62 | theorem commutatorElement_inv : β
gβ, gβββ»ΒΉ = β
gβ, gββ := by |
simp_rw [commutatorElement_def, mul_inv_rev, inv_inv, mul_assoc]
| 1,242 |
import Mathlib.Algebra.Group.Commutator
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Bracket
import Mathlib.GroupTheory.Subgroup.Centralizer
import Mathlib.Tactic.Group
#align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
variable... | Mathlib/GroupTheory/Commutator.lean | 65 | 66 | theorem map_commutatorElement : (f β
gβ, gββ : G') = β
f gβ, f gββ := by |
simp_rw [commutatorElement_def, map_mul f, map_inv f]
| 1,242 |
import Mathlib.Algebra.Group.Commutator
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Bracket
import Mathlib.GroupTheory.Subgroup.Centralizer
import Mathlib.Tactic.Group
#align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
variable... | Mathlib/GroupTheory/Commutator.lean | 100 | 104 | theorem commutator_eq_bot_iff_le_centralizer : β
Hβ, Hββ = β₯ β Hβ β€ centralizer Hβ := by |
rw [eq_bot_iff, commutator_le]
refine forall_congr' fun p =>
forall_congr' fun _hp => forall_congr' fun q => forall_congr' fun hq => ?_
rw [mem_bot, commutatorElement_eq_one_iff_mul_comm, eq_comm]
| 1,242 |
import Mathlib.Algebra.Group.Commutator
import Mathlib.Algebra.Group.Subgroup.Finite
import Mathlib.Data.Bracket
import Mathlib.GroupTheory.Subgroup.Centralizer
import Mathlib.Tactic.Group
#align_import group_theory.commutator from "leanprover-community/mathlib"@"4be589053caf347b899a494da75410deb55fb3ef"
variable... | Mathlib/GroupTheory/Commutator.lean | 108 | 116 | theorem commutator_commutator_eq_bot_of_rotate (h1 : β
β
Hβ, Hββ, Hββ = β₯) (h2 : β
β
Hβ, Hββ, Hββ = β₯) :
β
β
Hβ, Hββ, Hββ = β₯ := by |
simp_rw [commutator_eq_bot_iff_le_centralizer, commutator_le,
mem_centralizer_iff_commutator_eq_one, β commutatorElement_def] at h1 h2 β’
intro x hx y hy z hz
trans x * z * β
y, β
zβ»ΒΉ, xβ»ΒΉβββ»ΒΉ * zβ»ΒΉ * y * β
xβ»ΒΉ, β
yβ»ΒΉ, zβββ»ΒΉ * yβ»ΒΉ * xβ»ΒΉ
Β· group
Β· rw [h1 _ (Hβ.inv_mem hy) _ hz _ (Hβ.inv_mem hx), h2 _ (Hβ.inv_m... | 1,242 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.