declaration stringlengths 27 11.3k | file stringlengths 52 114 | context dict | tactic_states listlengths 1 1.24k |
|---|---|---|---|
theorem coe_dvd : ↑u ∣ a :=
⟨↑u⁻¹ * a, by simp⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Divisibility/Units.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[Monoid α] {a b : α} {u : αˣ}"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝ : Monoid α\na : α\nu : αˣ\n⊢ a = ↑u * (↑u⁻¹ * a)",
"after_state": "No Goals!"
}
] |
theorem mul_right_dvd : a * u ∣ b ↔ a ∣ b :=
Iff.intro (fun ⟨c, eq⟩ => ⟨↑u * c, eq.trans (mul_assoc _ _ _)⟩) fun h =>
dvd_trans (Dvd.intro (↑u⁻¹) (by rw [mul_assoc, u.mul_inv, mul_one])) h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Divisibility/Units.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[Monoid α] {a b : α} {u : αˣ}"
]
} | [
{
"line": "rw [mul_assoc, u.mul_inv, mul_one]",
"before_state": "α : Type u_1\ninst✝ : Monoid α\na b : α\nu : αˣ\nh : a ∣ b\n⊢ a * ↑u * ↑u⁻¹ = a",
"after_state": "No Goals!"
},
{
"line": "rewrite [mul_assoc, u.mul_inv, mul_one]",
"before_state": "α : Type u_1\ninst✝ : Monoid α\na b : α\nu : ... |
theorem dvd (hu : IsUnit u) : u ∣ a := by
rcases hu with ⟨u, rfl⟩
apply Units.coe_dvd
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Divisibility/Units.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[Monoid α] {a b : α} {u : αˣ}",
"[CommMonoid α] {a b : α} {u : αˣ}",
"[Monoid α] {a b u : α}"
]
} | [
{
"line": "rcases hu with ⟨u, rfl⟩",
"before_state": "α : Type u_1\ninst✝² : Monoid α\ninst✝¹ : CommMonoid α\ninst✝ : Monoid α\na u : α\nhu : IsUnit u\n⊢ u ∣ a",
"after_state": "case intro\nα : Type u_1\ninst✝² : Monoid α\ninst✝¹ : CommMonoid α\ninst✝ : Monoid α\na : α\nu : αˣ\n⊢ ↑u ∣ a"
},
{
"l... |
theorem mul_right_dvd (hu : IsUnit u) : a * u ∣ b ↔ a ∣ b := by
rcases hu with ⟨u, rfl⟩
apply Units.mul_right_dvd
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Divisibility/Units.lean | {
"open": [],
"variables": [
"{α : Type*}",
"[Monoid α] {a b : α} {u : αˣ}",
"[CommMonoid α] {a b : α} {u : αˣ}",
"[Monoid α] {a b u : α}"
]
} | [
{
"line": "rcases hu with ⟨u, rfl⟩",
"before_state": "α : Type u_1\ninst✝² : Monoid α\ninst✝¹ : CommMonoid α\ninst✝ : Monoid α\na b u : α\nhu : IsUnit u\n⊢ a * u ∣ b ↔ a ∣ b",
"after_state": "case intro\nα : Type u_1\ninst✝² : Monoid α\ninst✝¹ : CommMonoid α\ninst✝ : Monoid α\na b : α\nu : αˣ\n⊢ a * ↑u ... |
theorem mod_add_div' (m k : R) : m % k + m / k * k = m := by
rw [mul_comm]
exact mod_add_div _ _
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Defs.lean | {
"open": [],
"variables": [
"{R : Type u} [EuclideanDomain R]"
]
} | [
{
"line": "rw [mul_comm]",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\nm k : R\n⊢ m % k + m / k * k = m",
"after_state": "R : Type u\ninst✝ : EuclideanDomain R\nm k : R\n⊢ m % k + k * (m / k) = m"
},
{
"line": "rewrite [mul_comm]",
"before_state": "R : Type u\ninst✝ : EuclideanDo... |
theorem div_add_mod' (m k : R) : m / k * k + m % k = m := by
rw [mul_comm]
exact div_add_mod _ _
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Defs.lean | {
"open": [],
"variables": [
"{R : Type u} [EuclideanDomain R]"
]
} | [
{
"line": "rw [mul_comm]",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\nm k : R\n⊢ m / k * k + m % k = m",
"after_state": "R : Type u\ninst✝ : EuclideanDomain R\nm k : R\n⊢ k * (m / k) + m % k = m"
},
{
"line": "rewrite [mul_comm]",
"before_state": "R : Type u\ninst✝ : EuclideanDo... |
theorem mod_zero (a : R) : a % 0 = a := by simpa only [zero_mul, zero_add] using div_add_mod a 0
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Defs.lean | {
"open": [],
"variables": [
"{R : Type u} [EuclideanDomain R]"
]
} | [
{
"line": "simpa only [zero_mul, zero_add] using div_add_mod a 0",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\na : R\n⊢ a % 0 = a",
"after_state": "No Goals!"
}
] |
theorem eq_div_of_mul_eq_left {a b c : R} (hb : b ≠ 0) (h : a * b = c) : a = c / b := by
rw [← h]
rw [mul_div_cancel_right₀ _ hb]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]"
]
} | [
{
"line": "rw [← h]",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\na b c : R\nhb : b ≠ 0\nh : a * b = c\n⊢ a = c / b",
"after_state": "R : Type u\ninst✝ : EuclideanDomain R\na b c : R\nhb : b ≠ 0\nh : a * b = c\n⊢ a = a * b / b"
},
{
"line": "rewrite [← h]",
"before_state": "R : T... |
theorem eq_div_of_mul_eq_right {a b c : R} (ha : a ≠ 0) (h : a * b = c) : b = c / a := by
rw [← h]
rw [mul_div_cancel_left₀ _ ha]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]"
]
} | [
{
"line": "rw [← h]",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\na b c : R\nha : a ≠ 0\nh : a * b = c\n⊢ b = c / a",
"after_state": "R : Type u\ninst✝ : EuclideanDomain R\na b c : R\nha : a ≠ 0\nh : a * b = c\n⊢ b = a * b / a"
},
{
"line": "rewrite [← h]",
"before_state": "R : T... |
theorem div_dvd_of_dvd {p q : R} (hpq : q ∣ p) : p / q ∣ p := by
by_cases hq : q = 0
· rw [hq, zero_dvd_iff] at hpq
rw [hpq]
exact dvd_zero _
use q
rw [mul_comm]
rw [← EuclideanDomain.mul_div_assoc _ hpq]
rw [mul_comm]
rw [mul_div_cancel_right₀ _ hq]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]"
]
} | [
{
"line": "by_cases hq : q = 0",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\np q : R\nhpq : q ∣ p\n⊢ p / q ∣ p",
"after_state": "case pos\nR : Type u\ninst✝ : EuclideanDomain R\np q : R\nhpq : q ∣ p\nhq : q = 0\n⊢ p / q ∣ p\n---\ncase neg\nR : Type u\ninst✝ : EuclideanDomain R\np q : R\nhpq ... |
theorem dvd_div_of_mul_dvd {a b c : R} (h : a * b ∣ c) : b ∣ c / a := by
rcases eq_or_ne a 0 with (rfl | ha)
· simp only [div_zero, dvd_zero]
rcases h with ⟨d, rfl⟩
refine ⟨d, ?_⟩
rw [mul_assoc]
rw [mul_div_cancel_left₀ _ ha]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]"
]
} | [
{
"line": "rcases eq_or_ne a 0 with (rfl | ha)",
"before_state": "R : Type u\ninst✝ : EuclideanDomain R\na b c : R\nh : a * b ∣ c\n⊢ b ∣ c / a",
"after_state": "case inl\nR : Type u\ninst✝ : EuclideanDomain R\nb c : R\nh : 0 * b ∣ c\n⊢ b ∣ c / 0\n---\ncase inr\nR : Type u\ninst✝ : EuclideanDomain R\na b... |
theorem mul_div_mul_cancel {a b c : R} (ha : a ≠ 0) (hcb : c ∣ b) : a * b / (a * c) = b / c := by
by_cases hc : c = 0; · simp [hc]
refine eq_div_of_mul_eq_right hc (mul_left_cancel₀ ha ?_)
rw [← mul_assoc]
rw [← mul_div_assoc _ (mul_dvd_mul_left a hcb)]
rw [mul_div_cancel_left₀ _ (mul_ne_zero ha hc)]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "by_cases hc : c = 0",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\na b c : R\nha : a ≠ 0\nhcb : c ∣ b\n⊢ a * b / (a * c) = b / c",
"after_state": "case pos\nR : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\na b c : R\nha : a ≠ 0\nh... |
theorem mul_div_mul_comm_of_dvd_dvd {a b c d : R} (hac : c ∣ a) (hbd : d ∣ b) :
a * b / (c * d) = a / c * (b / d) := by
rcases eq_or_ne c 0 with (rfl | hc0); · simp
rcases eq_or_ne d 0 with (rfl | hd0); · simp
obtain ⟨k1, rfl⟩ := hac
obtain ⟨k2, rfl⟩ := hbd
rw [mul_div_cancel_left₀ _ hc0]
rw [mul_div_ca... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rcases eq_or_ne c 0 with (rfl | hc0)",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\na b c d : R\nhac : c ∣ a\nhbd : d ∣ b\n⊢ a * b / (c * d) = a / c * (b / d)",
"after_state": "case inl\nR : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : Decidable... |
theorem add_mul_div_left (x y z : R) (h1 : y ≠ 0) (h2 : y ∣ x) : (x + y * z) / y = x / y + z := by
rw [eq_comm]
apply eq_div_of_mul_eq_right h1
rw [mul_add]
rw [EuclideanDomain.mul_div_cancel' h1 h2]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [eq_comm]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x\n⊢ (x + y * z) / y = x / y + z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x\n⊢ x... |
theorem add_mul_div_right (x y z : R) (h1 : y ≠ 0) (h2 : y ∣ x) : (x + z * y) / y = x / y + z := by
rw [mul_comm z y]
exact add_mul_div_left _ _ _ h1 h2
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [mul_comm z y]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x\n⊢ (x + z * y) / y = x / y + z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x... |
theorem sub_mul_div_left (x y z : R) (h1 : y ≠ 0) (h2 : y ∣ x) : (x - y * z) / y = x / y - z := by
rw [eq_comm]
apply eq_div_of_mul_eq_right h1
rw [mul_sub]
rw [EuclideanDomain.mul_div_cancel' h1 h2]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [eq_comm]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x\n⊢ (x - y * z) / y = x / y - z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x\n⊢ x... |
theorem sub_mul_div_right (x y z : R) (h1 : y ≠ 0) (h2 : y ∣ x) : (x - z * y) / y = x / y - z := by
rw [mul_comm z y]
exact sub_mul_div_left _ _ _ h1 h2
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [mul_comm z y]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x\n⊢ (x - z * y) / y = x / y - z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : y ≠ 0\nh2 : y ∣ x... |
theorem mul_add_div_left (x y z : R) (h1 : z ≠ 0) (h2 : z ∣ y) : (z * x + y) / z = x + y / z := by
rw [eq_comm]
apply eq_div_of_mul_eq_right h1
rw [mul_add]
rw [EuclideanDomain.mul_div_cancel' h1 h2]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [eq_comm]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y\n⊢ (z * x + y) / z = x + y / z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y\n⊢ x... |
theorem mul_add_div_right (x y z : R) (h1 : z ≠ 0) (h2 : z ∣ y) : (x * z + y) / z = x + y / z := by
rw [mul_comm x z]
exact mul_add_div_left _ _ _ h1 h2
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [mul_comm x z]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y\n⊢ (x * z + y) / z = x + y / z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y... |
theorem mul_sub_div_left (x y z : R) (h1 : z ≠ 0) (h2 : z ∣ y) : (z * x - y) / z = x - y / z := by
rw [eq_comm]
apply eq_div_of_mul_eq_right h1
rw [mul_sub]
rw [EuclideanDomain.mul_div_cancel' h1 h2]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [eq_comm]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y\n⊢ (z * x - y) / z = x - y / z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y\n⊢ x... |
theorem mul_sub_div_right (x y z : R) (h1 : z ≠ 0) (h2 : z ∣ y) : (x * z - y) / z = x - y / z := by
rw [mul_comm x z]
exact mul_sub_div_left _ _ _ h1 h2
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "rw [mul_comm x z]",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y\n⊢ (x * z - y) / z = x - y / z",
"after_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z : R\nh1 : z ≠ 0\nh2 : z ∣ y... |
theorem div_add_div_of_dvd {x y z t : R} (h1 : y ≠ 0) (h2 : t ≠ 0) (h3 : y ∣ x) (h4 : t ∣ z) :
x / y + z / t = (t * x + y * z) / (t * y):= by
apply eq_div_of_mul_eq_right (mul_ne_zero h2 h1)
rw [mul_add]
rw [mul_assoc]
rw [EuclideanDomain.mul_div_cancel' h1 h3]
rw [mul_comm t y]
rw [mul_assoc]
rw [Euc... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "apply eq_div_of_mul_eq_right (mul_ne_zero h2 h1)",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z t : R\nh1 : y ≠ 0\nh2 : t ≠ 0\nh3 : y ∣ x\nh4 : t ∣ z\n⊢ x / y + z / t = (t * x + y * z) / (t * y)",
"after_state": "No Goals!"
}
] |
theorem div_sub_div_of_dvd {x y z t : R} (h1 : y ≠ 0) (h2 : t ≠ 0) (h3 : y ∣ x) (h4 : t ∣ z) :
x / y - z / t = (t * x - y * z) / (t * y):= by
apply eq_div_of_mul_eq_right (mul_ne_zero h2 h1)
rw [mul_sub]
rw [mul_assoc]
rw [EuclideanDomain.mul_div_cancel' h1 h3]
rw [mul_comm t y]
rw [mul_assoc]
rw [Euc... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/EuclideanDomain/Basic.lean | {
"open": [],
"variables": [
"{R : Type u}",
"[EuclideanDomain R]",
"[DecidableEq R]",
"[DecidableEq R]"
]
} | [
{
"line": "apply eq_div_of_mul_eq_right (mul_ne_zero h2 h1)",
"before_state": "R : Type u\ninst✝² : EuclideanDomain R\ninst✝¹ inst✝ : DecidableEq R\nx y z t : R\nh1 : y ≠ 0\nh2 : t ≠ 0\nh3 : y ∣ x\nh4 : t ∣ z\n⊢ x / y - z / t = (t * x - y * z) / (t * y)",
"after_state": "No Goals!"
}
] |
theorem smul_one_eq_cast (A : Type*) [DivisionRing A] (m : ℚ) : m • (1 : A) = ↑m := by
rw [Rat.smul_def]
rw [mul_one]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Defs.lean | {
"open": [
"Function"
],
"variables": [
"{K : Type*}",
"[DivisionSemiring K]",
"(K)",
"[DivisionRing K]"
]
} | [
{
"line": "rw [Rat.smul_def]",
"before_state": "A : Type u_2\ninst✝ : DivisionRing A\nm : ℚ\n⊢ m • 1 = ↑m",
"after_state": "A : Type u_2\ninst✝ : DivisionRing A\nm : ℚ\n⊢ ↑m * 1 = ↑m"
},
{
"line": "rewrite [Rat.smul_def]",
"before_state": "A : Type u_2\ninst✝ : DivisionRing A\nm : ℚ\n⊢ m • 1... |
lemma cast_negOnePow (K : Type*) (n : ℤ) [DivisionRing K] : n.negOnePow = (-1 : K) ^ n := by
rcases even_or_odd' n with ⟨k, rfl | rfl⟩
· simp [zpow_mul, zpow_ofNat]
· rw [zpow_add_one₀ (by norm_num), zpow_mul, zpow_ofNat]
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/NegOnePow.lean | {
"open": [],
"variables": []
} | [
{
"line": "rcases even_or_odd' n with ⟨k, rfl | rfl⟩",
"before_state": "K : Type u_1\nn : ℤ\ninst✝ : DivisionRing K\n⊢ ↑↑n.negOnePow = (-1) ^ n",
"after_state": "No Goals!"
}
] |
private theorem mul_inv_cancel_aux (a : ZMod p) (h : a ≠ 0) : a * a⁻¹ = 1 := by
obtain ⟨k, rfl⟩ := natCast_zmod_surjective a
apply coe_mul_inv_eq_one
apply Nat.Coprime.symm
rwa [Nat.Prime.coprime_iff_not_dvd Fact.out, ← CharP.cast_eq_zero_iff (ZMod p)]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/ZMod.lean | {
"open": [],
"variables": [
"(p : ℕ) [hp : Fact p.Prime]"
]
} | [
{
"line": "obtain ⟨k, rfl⟩ := natCast_zmod_surjective a",
"before_state": "p : ℕ\nhp : Fact (Nat.Prime p)\na : ZMod p\nh : a ≠ 0\n⊢ a * a⁻¹ = 1",
"after_state": "No Goals!"
}
] |
theorem fieldRange_eq_map : f.fieldRange = Subfield.map f ⊤ := by
ext
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Basic.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(s t : Subfield K)",
"(f : K →+* L)",
"(g : L →+* M) (f : K →+* L)"
]
} | [
{
"line": "ext",
"before_state": "K : Type u\nL : Type v\ninst✝¹ : DivisionRing K\ninst✝ : DivisionRing L\nf : K →+* L\n⊢ f.fieldRange = Subfield.map f ⊤",
"after_state": "case h\nK : Type u\nL : Type v\ninst✝¹ : DivisionRing K\ninst✝ : DivisionRing L\nf : K →+* L\nx✝ : L\n⊢ x✝ ∈ f.fieldRange ↔ x✝ ∈ Sub... |
theorem coe_sInf (S : Set (Subfield K)) : ((sInf S : Subfield K) : Set K) = ⋂ s ∈ S, ↑s :=
show ((sInf (Subfield.toSubring '' S) : Subring K) : Set K) = ⋂ s ∈ S, ↑s by
ext x
rw [Subring.coe_sInf]
rw [Set.mem_iInter]
rw [Set.mem_iInter]
exact
⟨fun h s s' ⟨s_mem, s'_eq⟩ => h s.toSubring _ ⟨⟨s,... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Basic.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(s t : Subfield K)",
"(f : K →+* L)",
"(g : L →+* M) (f : K →+* L)"
]
} | [
{
"line": "ext x",
"before_state": "K : Type u\ninst✝ : DivisionRing K\nS : Set (Subfield K)\n⊢ ↑(sInf (Subfield.toSubring '' S)) = ⋂ s ∈ S, ↑s",
"after_state": "case h\nK : Type u\ninst✝ : DivisionRing K\nS : Set (Subfield K)\nx : K\n⊢ x ∈ ↑(sInf (Subfield.toSubring '' S)) ↔ x ∈ ⋂ s ∈ S, ↑s"
},
{
... |
theorem sInf_toSubring (s : Set (Subfield K)) :
(sInf s).toSubring = ⨅ t ∈ s, Subfield.toSubring t := by
ext x
simp [mem_sInf, ← sInf_image, Subring.mem_sInf]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Basic.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(s t : Subfield K)",
"(f : K →+* L)",
"(g : L →+* M) (f : K →+* L)"
]
} | [
{
"line": "ext x",
"before_state": "K : Type u\ninst✝ : DivisionRing K\ns : Set (Subfield K)\n⊢ (sInf s).toSubring = ⨅ t ∈ s, t.toSubring",
"after_state": "case h\nK : Type u\ninst✝ : DivisionRing K\ns : Set (Subfield K)\nx : K\n⊢ x ∈ (sInf s).toSubring ↔ x ∈ ⨅ t ∈ s, t.toSubring"
},
{
"line": "... |
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Subfield K} (hS : Directed (· ≤ ·) S)
{x : K} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i := by
let s : Subfield K :=
{ __ := Subring.copy _ _ (Subring.coe_iSup_of_directed hS).symm
inv_mem' := fun _ hx ↦ have ⟨i, hi⟩ := Set.mem_iUnion.mp hx
Set.me... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Basic.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(s t : Subfield K)",
"(f : K →+* L)",
"(g : L →+* M) (f : K →+* L)",
"(K) in"
]
} | [
{
"line": "let s : Subfield K :=\n { __ := Subring.copy _ _ (Subring.coe_iSup_of_directed hS).symm\n inv_mem' := fun _ hx ↦\n have ⟨i, hi⟩ := Set.mem_iUnion.mp hx\n Set.mem_iUnion.mpr ⟨i, (S i).inv_mem hi⟩ }",
"before_state": "K : Type u\ninst✝ : DivisionRing K\nι : Sort u_1\nhι : Nonempty ι\n... |
lemma nnratCast_mem (s : S) (q : ℚ≥0) : (q : K) ∈ s := by
simpa only [NNRat.cast_def] using div_mem (natCast_mem s q.num) (natCast_mem s q.den)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Defs.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(S : Type*) [SetLike S K] [h : SubfieldClass S K]",
"{S} {x : K}"
]
} | [
{
"line": "simpa only [NNRat.cast_def] using div_mem (natCast_mem s q.num) (natCast_mem s q.den)",
"before_state": "K : Type u\ninst✝¹ : DivisionRing K\nS : Type u_1\ninst✝ : SetLike S K\nh : SubfieldClass S K\ns : S\nq : ℚ≥0\n⊢ ↑q ∈ s",
"after_state": "No Goals!"
}
] |
lemma ratCast_mem (s : S) (q : ℚ) : (q : K) ∈ s := by
simpa only [Rat.cast_def] using div_mem (intCast_mem s q.num) (natCast_mem s q.den)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Defs.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(S : Type*) [SetLike S K] [h : SubfieldClass S K]",
"{S} {x : K}"
]
} | [
{
"line": "simpa only [Rat.cast_def] using div_mem (intCast_mem s q.num) (natCast_mem s q.den)",
"before_state": "K : Type u\ninst✝¹ : DivisionRing K\nS : Type u_1\ninst✝ : SetLike S K\nh : SubfieldClass S K\ns : S\nq : ℚ\n⊢ ↑q ∈ s",
"after_state": "No Goals!"
}
] |
lemma nnqsmul_mem (s : S) (q : ℚ≥0) (hx : x ∈ s) : q • x ∈ s := by
simpa only [NNRat.smul_def] using mul_mem (nnratCast_mem _ _) hx
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Defs.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(S : Type*) [SetLike S K] [h : SubfieldClass S K]",
"{S} {x : K}"
]
} | [
{
"line": "simpa only [NNRat.smul_def] using mul_mem (nnratCast_mem _ _) hx",
"before_state": "K : Type u\ninst✝¹ : DivisionRing K\nS : Type u_1\ninst✝ : SetLike S K\nh : SubfieldClass S K\nx : K\ns : S\nq : ℚ≥0\nhx : x ∈ s\n⊢ q • x ∈ s",
"after_state": "No Goals!"
}
] |
lemma qsmul_mem (s : S) (q : ℚ) (hx : x ∈ s) : q • x ∈ s := by
simpa only [Rat.smul_def] using mul_mem (ratCast_mem _ _) hx
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Field/Subfield/Defs.lean | {
"open": [],
"variables": [
"{K : Type u} {L : Type v} {M : Type w}",
"[DivisionRing K] [DivisionRing L] [DivisionRing M]",
"(S : Type*) [SetLike S K] [h : SubfieldClass S K]",
"{S} {x : K}"
]
} | [
{
"line": "simpa only [Rat.smul_def] using mul_mem (ratCast_mem _ _) hx",
"before_state": "K : Type u\ninst✝¹ : DivisionRing K\nS : Type u_1\ninst✝ : SetLike S K\nh : SubfieldClass S K\nx : K\ns : S\nq : ℚ\nhx : x ∈ s\n⊢ q • x ∈ s",
"after_state": "No Goals!"
}
] |
theorem toFinsupp_of (x : X) : toFinsupp (of x) = Finsupp.single x 1 := by
simp only [toFinsupp]
simp only [lift.of]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAbelianGroup/Finsupp.lean | {
"open": [
"Finsupp FreeAbelianGroup",
"Finsupp"
],
"variables": [
"{X : Type*}"
]
} | [
{
"line": "simp only [toFinsupp]",
"before_state": "X : Type u_1\nx : X\n⊢ toFinsupp (of x) = fun₀ | x => 1",
"after_state": "X : Type u_1\nx : X\n⊢ (FreeAbelianGroup.lift fun x => fun₀ | x => 1) (of x) = fun₀ | x => 1"
},
{
"line": "simp only [lift.of]",
"before_state": "X : Type u_1\nx : X... |
theorem toFinsupp_toFreeAbelianGroup (f : X →₀ ℤ) :
FreeAbelianGroup.toFinsupp (Finsupp.toFreeAbelianGroup f) = f := by
rw [← AddMonoidHom.comp_apply]
rw [toFinsupp_comp_toFreeAbelianGroup]
rw [AddMonoidHom.id_apply]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAbelianGroup/Finsupp.lean | {
"open": [
"Finsupp FreeAbelianGroup",
"Finsupp"
],
"variables": [
"{X : Type*}"
]
} | [
{
"line": "rw [← AddMonoidHom.comp_apply]",
"before_state": "X : Type u_1\nf : X →₀ ℤ\n⊢ toFinsupp (toFreeAbelianGroup f) = f",
"after_state": "X : Type u_1\nf : X →₀ ℤ\n⊢ (toFinsupp.comp toFreeAbelianGroup) f = f"
},
{
"line": "rewrite [← AddMonoidHom.comp_apply]",
"before_state": "X : Type... |
theorem support_nsmul (k : ℕ) (h : k ≠ 0) (a : FreeAbelianGroup X) :
support (k • a) = support a := by
apply support_zsmul k _ a
exact mod_cast h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAbelianGroup/Finsupp.lean | {
"open": [
"Finsupp FreeAbelianGroup",
"Finsupp"
],
"variables": [
"{X : Type*}",
"(X)",
"{X}"
]
} | [
{
"line": "apply support_zsmul k _ a",
"before_state": "X : Type u_1\nk : ℕ\nh : k ≠ 0\na : FreeAbelianGroup X\n⊢ (k • a).support = a.support",
"after_state": "X : Type u_1\nk : ℕ\nh : k ≠ 0\na : FreeAbelianGroup X\n⊢ ↑k ≠ 0"
},
{
"line": "exact mod_cast h",
"before_state": "X : Type u_1\nk ... |
theorem cardinalMk_le_max_lift :
#(FreeAlgebra R X) ≤ Cardinal.lift.{v} #R ⊔ Cardinal.lift.{u} #X ⊔ ℵ₀ := by
cases subsingleton_or_nontrivial R
· exact (cardinalMk_eq_one R X).trans_le (le_max_of_le_right one_le_aleph0)
cases isEmpty_or_nonempty X
· exact (cardinalMk_eq_lift R X).trans_le (le_max_of_le_left... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAlgebra/Cardinality.lean | {
"open": [
"Cardinal"
],
"variables": [
"(R : Type u) [CommSemiring R]",
"(X : Type v)"
]
} | [
{
"line": "cases subsingleton_or_nontrivial R",
"before_state": "R : Type u\ninst✝ : CommSemiring R\nX : Type v\n⊢ #(FreeAlgebra R X) ≤ max (max (lift.{v, u} #R) (lift.{u, v} #X)) ℵ₀",
"after_state": "case inl\nR : Type u\ninst✝ : CommSemiring R\nX : Type v\nh✝ : Subsingleton R\n⊢ #(FreeAlgebra R X) ≤ m... |
theorem cardinalMk_eq_max [Nonempty X] [Nontrivial R] : #(FreeAlgebra R X) = #R ⊔ #X ⊔ ℵ₀ := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAlgebra/Cardinality.lean | {
"open": [
"Cardinal"
],
"variables": [
"(R : Type u) [CommSemiring R]",
"(X : Type v)",
"(X : Type u)"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝² : CommSemiring R\nX : Type u\ninst✝¹ : Nonempty X\ninst✝ : Nontrivial R\n⊢ #(FreeAlgebra R X) = max (max #R #X) ℵ₀",
"after_state": "No Goals!"
}
] |
theorem cardinalMk_eq [IsEmpty X] : #(FreeAlgebra R X) = #R := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAlgebra/Cardinality.lean | {
"open": [
"Cardinal"
],
"variables": [
"(R : Type u) [CommSemiring R]",
"(X : Type v)",
"(X : Type u)"
]
} | [
{
"line": "simp",
"before_state": "R : Type u\ninst✝¹ : CommSemiring R\nX : Type u\ninst✝ : IsEmpty X\n⊢ #(FreeAlgebra R X) = #R",
"after_state": "No Goals!"
}
] |
theorem cardinalMk_le_max : #(FreeAlgebra R X) ≤ #R ⊔ #X ⊔ ℵ₀ := by
simpa using cardinalMk_le_max_lift R X
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/FreeAlgebra/Cardinality.lean | {
"open": [
"Cardinal"
],
"variables": [
"(R : Type u) [CommSemiring R]",
"(X : Type v)",
"(X : Type u)"
]
} | [
{
"line": "simpa using cardinalMk_le_max_lift R X",
"before_state": "R : Type u\ninst✝ : CommSemiring R\nX : Type u\n⊢ #(FreeAlgebra R X) ≤ max (max #R #X) ℵ₀",
"after_state": "No Goals!"
}
] |
theorem coe_normUnit {a : G₀} (h0 : a ≠ 0) : (↑(normUnit a) : G₀) = a⁻¹ := by simp [normUnit, h0]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Basic.lean | {
"open": [
"Associates"
],
"variables": [
"{α : Type*}",
"[CancelCommMonoidWithZero α] [NormalizationMonoid α]",
"[CancelCommMonoidWithZero α] [NormalizationMonoid α]",
"[CancelCommMonoidWithZero α]",
"[HasDistribNeg α]",
"[CancelCommMonoidWithZero α] [Subsingleton αˣ]",
"[CommRin... | [
{
"line": "simp [normUnit, h0]",
"before_state": "G₀ : Type u_2\ninst✝¹ : CommGroupWithZero G₀\ninst✝ : DecidableEq G₀\na : G₀\nh0 : a ≠ 0\n⊢ ↑(normUnit a) = a⁻¹",
"after_state": "No Goals!"
}
] |
theorem lcm_insert [DecidableEq β] {b : β} :
(insert b s : Finset β).lcm f = GCDMonoid.lcm (f b) (s.lcm f) := by
by_cases h : b ∈ s
· rw [insert_eq_of_mem h,
(lcm_eq_right_iff (f b) (s.lcm f) (Multiset.normalize_lcm (s.1.map f))).2 (dvd_lcm h)]
apply fold_insert h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "by_cases h : b ∈ s",
"before_state": "α : Type u_2\nβ : Type u_3\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : NormalizedGCDMonoid α\ns : Finset β\nf : β → α\ninst✝ : DecidableEq β\nb : β\n⊢ (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)",
"after_state": "case pos\nα : Type u_2\nβ : Type... |
theorem lcm_congr {f g : β → α} (hs : s₁ = s₂) (hfg : ∀ a ∈ s₂, f a = g a) :
s₁.lcm f = s₂.lcm g := by
subst hs
exact Finset.fold_congr hfg
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "subst hs",
"before_state": "α : Type u_2\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : NormalizedGCDMonoid α\ns₁ s₂ : Finset β\nf g : β → α\nhs : s₁ = s₂\nhfg : ∀ a ∈ s₂, f a = g a\n⊢ s₁.lcm f = s₂.lcm g",
"after_state": "α : Type u_2\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWith... |
theorem lcm_image [DecidableEq β] {g : γ → β} (s : Finset γ) :
(s.image g).lcm f = s.lcm (f ∘ g) := by
classical induction s using Finset.induction <;> simp [*]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "classical induction s using Finset.induction <;> simp [*]",
"before_state": "α : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : NormalizedGCDMonoid α\nf : β → α\ninst✝ : DecidableEq β\ng : γ → β\ns : Finset γ\n⊢ (Finset.image g s).lcm f = s.lcm (f ∘ g)",
"... |
theorem gcd_insert [DecidableEq β] {b : β} :
(insert b s : Finset β).gcd f = GCDMonoid.gcd (f b) (s.gcd f) := by
by_cases h : b ∈ s
· rw [insert_eq_of_mem h,
(gcd_eq_right_iff (f b) (s.gcd f) (Multiset.normalize_gcd (s.1.map f))).2 (gcd_dvd h)]
apply fold_insert h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "by_cases h : b ∈ s",
"before_state": "α : Type u_2\nβ : Type u_3\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : NormalizedGCDMonoid α\ns : Finset β\nf : β → α\ninst✝ : DecidableEq β\nb : β\n⊢ (insert b s).gcd f = GCDMonoid.gcd (f b) (s.gcd f)",
"after_state": "case pos\nα : Type u_2\nβ : Type... |
theorem gcd_congr {f g : β → α} (hs : s₁ = s₂) (hfg : ∀ a ∈ s₂, f a = g a) :
s₁.gcd f = s₂.gcd g := by
subst hs
exact Finset.fold_congr hfg
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "subst hs",
"before_state": "α : Type u_2\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : NormalizedGCDMonoid α\ns₁ s₂ : Finset β\nf g : β → α\nhs : s₁ = s₂\nhfg : ∀ a ∈ s₂, f a = g a\n⊢ s₁.gcd f = s₂.gcd g",
"after_state": "α : Type u_2\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWith... |
theorem gcd_image [DecidableEq β] {g : γ → β} (s : Finset γ) :
(s.image g).gcd f = s.gcd (f ∘ g) := by
classical induction s using Finset.induction <;> simp [*]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "classical induction s using Finset.induction <;> simp [*]",
"before_state": "α : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : NormalizedGCDMonoid α\nf : β → α\ninst✝ : DecidableEq β\ng : γ → β\ns : Finset γ\n⊢ (Finset.image g s).gcd f = s.gcd (f ∘ g)",
"... |
theorem extract_gcd' (f g : β → α) (hs : ∃ x, x ∈ s ∧ f x ≠ 0)
(hg : ∀ b ∈ s, f b = s.gcd f * g b) : s.gcd g = 1 :=
((@mul_right_eq_self₀ _ _ (s.gcd f) _).1 <| by
conv_lhs => rw [← normalize_gcd, ← gcd_mul_left, ← gcd_congr rfl hg]).resolve_right <| by
contrapose! hs
exact gcd_eq_zero_iff.1 hs
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}",
"{s s₁ s₂ : Finset β} {f : β → α}"
]
} | [
{
"line": "conv_lhs => rw [← normalize_gcd, ← gcd_mul_left, ← gcd_congr rfl hg]",
"before_state": "α : Type u_2\nβ : Type u_3\ninst✝¹ : CancelCommMonoidWithZero α\ninst✝ : NormalizedGCDMonoid α\ns : Finset β\nf g : β → α\nhs : ∃ x ∈ s, f x ≠ 0\nhg : ∀ b ∈ s, f b = s.gcd f * g b\n⊢ s.gcd f * s.gcd g = s.gcd ... |
lemma gcd_div_eq_one (his : i ∈ s) (hfi : f i ≠ 0) : s.gcd (fun j ↦ f j / s.gcd f) = 1 := by
obtain ⟨g, he, hg⟩ := Finset.extract_gcd f ⟨i, his⟩
refine (Finset.gcd_congr rfl fun a ha ↦ ?_).trans hg
rw [he a ha]
rw [mul_div_cancel_left₀]
exact mt Finset.gcd_eq_zero_iff.1 fun h ↦ hfi <| h i his
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Finset.lean | {
"open": [
"Multiset"
],
"variables": [
"{ι α β γ : Type*}",
"[CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"{s s₁ s₂ : Finset β} {f : β → α}",
"{s s₁ s₂ : Finset β} {f : β → α}",
"[Div α] [MulDivCancelClass α] {f : ι → α} {s : Finset ι} {i : ι}"
]
} | [
{
"line": "obtain ⟨g, he, hg⟩ := Finset.extract_gcd f ⟨i, his⟩",
"before_state": "ι : Type u_1\nα : Type u_2\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : NormalizedGCDMonoid α\ninst✝¹ : Div α\ninst✝ : MulDivCancelClass α\nf : ι → α\ns : Finset ι\ni : ι\nhis : i ∈ s\nhfi : f i ≠ 0\n⊢ (s.gcd fun j => f j / ... |
theorem dvd_gcd {s : Multiset α} {a : α} : a ∣ s.gcd ↔ ∀ b ∈ s, a ∣ b :=
Multiset.induction_on s (by simp)
(by simp +contextual [or_imp, forall_and, dvd_gcd_iff])
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Multiset.lean | {
"open": [],
"variables": [
"{α : Type*} [CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"[DecidableEq α]"
]
} | [
{
"line": "simp",
"before_state": "α : Type u_1\ninst✝² : CancelCommMonoidWithZero α\ninst✝¹ : NormalizedGCDMonoid α\ninst✝ : DecidableEq α\ns : Multiset α\na : α\n⊢ a ∣ Multiset.gcd 0 ↔ ∀ b ∈ 0, a ∣ b",
"after_state": "No Goals!"
},
{
"line": "simp +contextual [or_imp, forall_and, dvd_gcd_iff]"... |
theorem extract_gcd' (s t : Multiset α) (hs : ∃ x, x ∈ s ∧ x ≠ (0 : α))
(ht : s = t.map (s.gcd * ·)) : t.gcd = 1 :=
((@mul_right_eq_self₀ _ _ s.gcd _).1 <| by
conv_lhs => rw [← normalize_gcd, ← gcd_map_mul, ← ht]).resolve_right <| by
contrapose! hs
exact s.gcd_eq_zero_iff.1 hs
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Multiset.lean | {
"open": [],
"variables": [
"{α : Type*} [CancelCommMonoidWithZero α] [NormalizedGCDMonoid α]",
"[DecidableEq α]",
"[DecidableEq α]"
]
} | [
{
"line": "conv_lhs => rw [← normalize_gcd, ← gcd_map_mul, ← ht]",
"before_state": "α : Type u_1\ninst✝³ : CancelCommMonoidWithZero α\ninst✝² : NormalizedGCDMonoid α\ninst✝¹ inst✝ : DecidableEq α\ns t : Multiset α\nhs : ∃ x ∈ s, x ≠ 0\nht : s = Multiset.map (fun x => s.gcd * x) t\n⊢ s.gcd * t.gcd = s.gcd",
... |
theorem exists_unit_of_abs (a : ℤ) : ∃ (u : ℤ) (_ : IsUnit u), (Int.natAbs a : ℤ) = u * a := by
rcases natAbs_eq a with h | h
· use 1, isUnit_one
rw [← h]
rw [one_mul]
· use -1, isUnit_one.neg
rw [← neg_eq_iff_eq_neg.mpr h]
simp only [neg_mul]
simp only [one_mul]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/GCDMonoid/Nat.lean | {
"open": [],
"variables": []
} | [
{
"line": "rcases natAbs_eq a with h | h",
"before_state": "a : ℤ\n⊢ ∃ u, ∃ (_ : IsUnit u), ↑a.natAbs = u * a",
"after_state": "No Goals!"
}
] |
lemma Even.smul_even [SMul β γ] (hf : f.Even) (hg : g.Even) : (f • g).Even := by
intro a
simp only [Pi.smul_apply']
simp only [hf a]
simp only [hg a]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝¹ : Neg α\nγ : Type u_4\nf : α → β\ng : α → γ\ninst✝ : SMul β γ\nhf : Function.Even f\nhg : Function.Even g\n⊢ Function.Even (f • g)",
"after_state": "α : Type u_1\nβ : Type u_2\ninst✝¹ : Neg α\nγ : Type u_4\nf : α → β\ng : α → γ\nin... |
lemma Even.smul_odd [Monoid β] [AddGroup γ] [DistribMulAction β γ] (hf : f.Even) (hg : g.Odd) :
(f • g).Odd := by
intro a
simp only [Pi.smul_apply']
simp only [hf a]
simp only [hg a]
simp only [smul_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg α\nγ : Type u_4\nf : α → β\ng : α → γ\ninst✝² : Monoid β\ninst✝¹ : AddGroup γ\ninst✝ : DistribMulAction β γ\nhf : Function.Even f\nhg : Function.Odd g\n⊢ Function.Odd (f • g)",
"after_state": "α : Type u_1\nβ : Type u_2\ninst... |
lemma Odd.smul_even [Ring β] [AddCommGroup γ] [Module β γ] (hf : f.Odd) (hg : g.Even) :
(f • g).Odd := by
intro a
simp only [Pi.smul_apply']
simp only [hf a]
simp only [hg a]
simp only [neg_smul]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg α\nγ : Type u_4\nf : α → β\ng : α → γ\ninst✝² : Ring β\ninst✝¹ : AddCommGroup γ\ninst✝ : Module β γ\nhf : Function.Odd f\nhg : Function.Even g\n⊢ Function.Odd (f • g)",
"after_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg... |
lemma Odd.smul_odd [Ring β] [AddCommGroup γ] [Module β γ] (hf : f.Odd) (hg : g.Odd) :
(f • g).Even := by
intro a
simp only [Pi.smul_apply']
simp only [hf a]
simp only [hg a]
simp only [smul_neg]
simp only [neg_smul]
simp only [neg_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg α\nγ : Type u_4\nf : α → β\ng : α → γ\ninst✝² : Ring β\ninst✝¹ : AddCommGroup γ\ninst✝ : Module β γ\nhf : Function.Odd f\nhg : Function.Odd g\n⊢ Function.Even (f • g)",
"after_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg... |
lemma Even.const_smul [SMul β γ] (hg : g.Even) (r : β) : (r • g).Even := by
intro a
simp only [Pi.smul_apply]
simp only [hg a]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝¹ : Neg α\nγ : Type u_4\ng : α → γ\ninst✝ : SMul β γ\nhg : Function.Even g\nr : β\n⊢ Function.Even (r • g)",
"after_state": "α : Type u_1\nβ : Type u_2\ninst✝¹ : Neg α\nγ : Type u_4\ng : α → γ\ninst✝ : SMul β γ\nhg : Function.Even g\... |
lemma Odd.const_smul [Monoid β] [AddGroup γ] [DistribMulAction β γ] (hg : g.Odd) (r : β) :
(r • g).Odd := by
intro a
simp only [Pi.smul_apply]
simp only [hg a]
simp only [smul_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg α\nγ : Type u_4\ng : α → γ\ninst✝² : Monoid β\ninst✝¹ : AddGroup γ\ninst✝ : DistribMulAction β γ\nhg : Function.Odd g\nr : β\n⊢ Function.Odd (r • g)",
"after_state": "α : Type u_1\nβ : Type u_2\ninst✝³ : Neg α\nγ : Type u_4\n... |
lemma Even.mul_even (hf : f.Even) (hg : g.Even) : (f * g).Even := by
intro a
simp only [Pi.mul_apply]
simp only [hf a]
simp only [hg a]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\ninst✝¹ : Neg α\nR : Type u_5\ninst✝ : Mul R\nf g : α → R\nhf : Function.Even f\nhg : Function.Even g\n⊢ Function.Even (f * g)",
"after_state": "α : Type u_1\ninst✝¹ : Neg α\nR : Type u_5\ninst✝ : Mul R\nf g : α → R\nhf : Function.Even f\nhg : Function.... |
lemma Even.mul_odd [HasDistribNeg R] (hf : f.Even) (hg : g.Odd) : (f * g).Odd := by
intro a
simp only [Pi.mul_apply]
simp only [hf a]
simp only [hg a]
simp only [mul_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\ninst✝² : Neg α\nR : Type u_5\ninst✝¹ : Mul R\nf g : α → R\ninst✝ : HasDistribNeg R\nhf : Function.Even f\nhg : Function.Odd g\n⊢ Function.Odd (f * g)",
"after_state": "α : Type u_1\ninst✝² : Neg α\nR : Type u_5\ninst✝¹ : Mul R\nf g : α → R\ninst✝ : Has... |
lemma Odd.mul_even [HasDistribNeg R] (hf : f.Odd) (hg : g.Even) : (f * g).Odd := by
intro a
simp only [Pi.mul_apply]
simp only [hf a]
simp only [hg a]
simp only [neg_mul]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\ninst✝² : Neg α\nR : Type u_5\ninst✝¹ : Mul R\nf g : α → R\ninst✝ : HasDistribNeg R\nhf : Function.Odd f\nhg : Function.Even g\n⊢ Function.Odd (f * g)",
"after_state": "α : Type u_1\ninst✝² : Neg α\nR : Type u_5\ninst✝¹ : Mul R\nf g : α → R\ninst✝ : Has... |
lemma Odd.mul_odd [HasDistribNeg R] (hf : f.Odd) (hg : g.Odd) : (f * g).Even := by
intro a
simp only [Pi.mul_apply]
simp only [hf a]
simp only [hg a]
simp only [mul_neg]
simp only [neg_mul]
simp only [neg_neg]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}"
]
} | [
{
"line": "intro a",
"before_state": "α : Type u_1\ninst✝² : Neg α\nR : Type u_5\ninst✝¹ : Mul R\nf g : α → R\ninst✝ : HasDistribNeg R\nhf : Function.Odd f\nhg : Function.Odd g\n⊢ Function.Even (f * g)",
"after_state": "α : Type u_1\ninst✝² : Neg α\nR : Type u_5\ninst✝¹ : Mul R\nf g : α → R\ninst✝ : Has... |
lemma zero_of_even_and_odd [Neg α] (he : f.Even) (ho : f.Odd) : f = 0 := by
ext r
rw [Pi.zero_apply]
rw [← neg_eq_self ℕ]
rw [← ho]
rw [he]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}",
"{α β : Type*} [AddCommGroup β] [NoZeroSMulDivisors ℕ β] {f : α → β}"
]
} | [
{
"line": "ext r",
"before_state": "α : Type u_6\nβ : Type u_7\ninst✝² : AddCommGroup β\ninst✝¹ : NoZeroSMulDivisors ℕ β\nf : α → β\ninst✝ : Neg α\nhe : Function.Even f\nho : Function.Odd f\n⊢ f = 0",
"after_state": "case h\nα : Type u_6\nβ : Type u_7\ninst✝² : AddCommGroup β\ninst✝¹ : NoZeroSMulDivisor... |
lemma Odd.sum_eq_zero [Fintype α] [InvolutiveNeg α] {f : α → β} (hf : f.Odd) : ∑ a, f a = 0 := by
simpa only [neg_eq_self ℕ,Finset.sum_neg_distrib,funext hf,Equiv.neg_apply] using
Equiv.sum_comp (.neg α) f
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}",
"{α β : Type*} [AddCommGroup β] [NoZeroSMulDivisors ℕ β] {f : α → β}"
]
} | [
{
"line": "simpa only [neg_eq_self ℕ, Finset.sum_neg_distrib, funext hf, Equiv.neg_apply] using Equiv.sum_comp (.neg α) f",
"before_state": "α : Type u_6\nβ : Type u_7\ninst✝³ : AddCommGroup β\ninst✝² : NoZeroSMulDivisors ℕ β\ninst✝¹ : Fintype α\ninst✝ : InvolutiveNeg α\nf : α → β\nhf : Function.Odd f\n⊢ ∑ ... |
lemma Odd.map_zero [NegZeroClass α] (hf : f.Odd) : f 0 = 0 := by
simp only [← neg_eq_self ℕ]
simp only [← hf 0]
simp only [neg_zero]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/EvenFunction.lean | {
"open": [],
"variables": [
"{α β : Type*} [Neg α]",
"{γ : Type*}",
"{γ : Type*} {f : α → β} {g : α → γ}",
"{R : Type*} [Mul R] {f g : α → R}",
"{α β : Type*} [AddCommGroup β] [NoZeroSMulDivisors ℕ β] {f : α → β}"
]
} | [
{
"line": "simp only [← neg_eq_self ℕ]",
"before_state": "α : Type u_6\nβ : Type u_7\ninst✝² : AddCommGroup β\ninst✝¹ : NoZeroSMulDivisors ℕ β\nf : α → β\ninst✝ : NegZeroClass α\nhf : Function.Odd f\n⊢ f 0 = 0",
"after_state": "α : Type u_6\nβ : Type u_7\ninst✝² : AddCommGroup β\ninst✝¹ : NoZeroSMulDivi... |
lemma compAddMonoidHom_injective_left (f : A →+ B) (hf : Surjective f) :
Injective fun ψ : AddChar B M ↦ ψ.compAddMonoidHom f := by
rintro ψ χ h; rw [DFunLike.ext'_iff] at h ⊢; exact hf.injective_comp_right h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/AddChar.lean | {
"open": [
"Function Multiplicative",
"Finset hiding card",
"Fintype (card)"
],
"variables": [
"(A : Type*) [AddMonoid A]",
"(M : Type*) [Monoid M]",
"{A B M N : Type*} [AddMonoid A] [AddMonoid B] [Monoid M] [Monoid N] {ψ : AddChar A M}"
]
} | [
{
"line": "rintro ψ χ h",
"before_state": "A : Type u_3\nB : Type u_4\nM : Type u_5\ninst✝² : AddMonoid A\ninst✝¹ : AddMonoid B\ninst✝ : Monoid M\nf : A →+ B\nhf : Surjective ⇑f\n⊢ Injective fun ψ => ψ.compAddMonoidHom f",
"after_state": "A : Type u_3\nB : Type u_4\nM : Type u_5\ninst✝² : AddMonoid A\ni... |
lemma compAddMonoidHom_injective_right (ψ : AddChar B M) (hψ : Injective ψ) :
Injective fun f : A →+ B ↦ ψ.compAddMonoidHom f := by
rintro f g h
rw [DFunLike.ext'_iff] at h ⊢; exact hψ.comp_left h
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/AddChar.lean | {
"open": [
"Function Multiplicative",
"Finset hiding card",
"Fintype (card)"
],
"variables": [
"(A : Type*) [AddMonoid A]",
"(M : Type*) [Monoid M]",
"{A B M N : Type*} [AddMonoid A] [AddMonoid B] [Monoid M] [Monoid N] {ψ : AddChar A M}"
]
} | [
{
"line": "rintro f g h",
"before_state": "A : Type u_3\nB : Type u_4\nM : Type u_5\ninst✝² : AddMonoid A\ninst✝¹ : AddMonoid B\ninst✝ : Monoid M\nψ : AddChar B M\nhψ : Injective ⇑ψ\n⊢ Injective fun f => ψ.compAddMonoidHom f",
"after_state": "A : Type u_3\nB : Type u_4\nM : Type u_5\ninst✝² : AddMonoid ... |
lemma coe_prod (s : Finset ι) (ψ : ι → AddChar A M) : ∏ i ∈ s, ψ i = ∏ i ∈ s, ⇑(ψ i) := by
induction s using Finset.cons_induction <;> simp [*]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/AddChar.lean | {
"open": [
"Function Multiplicative",
"Finset hiding card",
"Fintype (card)"
],
"variables": [
"(A : Type*) [AddMonoid A]",
"(M : Type*) [Monoid M]",
"{A B M N : Type*} [AddMonoid A] [AddMonoid B] [Monoid M] [Monoid N] {ψ : AddChar A M}",
"{ι A M : Type*} [AddMonoid A] [CommMonoid M]"... | [
{
"line": "focus\n induction s using Finset.cons_induction\n with_annotate_state\"<;>\" skip\n all_goals simp [*]",
"before_state": "ι : Type u_7\nA : Type u_8\nM : Type u_9\ninst✝¹ : AddMonoid A\ninst✝ : CommMonoid M\ns : Finset ι\nψ : ι → AddChar A M\n⊢ ⇑(∏ i ∈ s, ψ i) = ∏ i ∈ s, ⇑(ψ i)",
"after_st... |
lemma coe_sum (s : Finset ι) (ψ : ι → AddChar A M) : ∑ i ∈ s, ψ i = ∏ i ∈ s, ⇑(ψ i) := by
induction s using Finset.cons_induction <;> simp [*]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/AddChar.lean | {
"open": [
"Function Multiplicative",
"Finset hiding card",
"Fintype (card)"
],
"variables": [
"(A : Type*) [AddMonoid A]",
"(M : Type*) [Monoid M]",
"{A B M N : Type*} [AddMonoid A] [AddMonoid B] [Monoid M] [Monoid N] {ψ : AddChar A M}",
"{ι A M : Type*} [AddMonoid A] [CommMonoid M]"... | [
{
"line": "focus\n induction s using Finset.cons_induction\n with_annotate_state\"<;>\" skip\n all_goals simp [*]",
"before_state": "ι : Type u_7\nA : Type u_8\nM : Type u_9\ninst✝¹ : AddMonoid A\ninst✝ : CommMonoid M\ns : Finset ι\nψ : ι → AddChar A M\n⊢ ⇑(∑ i ∈ s, ψ i) = ∏ i ∈ s, ⇑(ψ i)",
"after_st... |
lemma sum_eq_ite (ψ : AddChar A R) [Decidable (ψ = 0)] :
∑ a, ψ a = if ψ = 0 then ↑(card A) else 0 := by
split_ifs with h
· simp [h]
obtain ⟨x, hx⟩ := ne_one_iff.1 h
refine eq_zero_of_mul_eq_self_left hx ?_
rw [Finset.mul_sum]
exact Fintype.sum_equiv (Equiv.addLeft x) _ _ fun y ↦ (map_add_eq_mul ..).sym... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/AddChar.lean | {
"open": [
"Function Multiplicative",
"Finset hiding card",
"Fintype (card)"
],
"variables": [
"(A : Type*) [AddMonoid A]",
"(M : Type*) [Monoid M]",
"{A B M N : Type*} [AddMonoid A] [AddMonoid B] [Monoid M] [Monoid N] {ψ : AddChar A M}",
"{ι A M : Type*} [AddMonoid A] [CommMonoid M]"... | [
{
"line": "split_ifs with h",
"before_state": "A : Type u_10\nR : Type u_11\ninst✝⁴ : AddGroup A\ninst✝³ : Fintype A\ninst✝² : CommSemiring R\ninst✝¹ : IsDomain R\nψ : AddChar A R\ninst✝ : Decidable (ψ = 0)\n⊢ ∑ a, ψ a = if ψ = 0 then ↑(card A) else 0",
"after_state": "case pos\nA : Type u_10\nR : Type ... |
theorem mul_mem_center {z₁ z₂ : M} (hz₁ : z₁ ∈ Set.center M) (hz₂ : z₂ ∈ Set.center M) :
z₁ * z₂ ∈ Set.center M where
comm a := calc
z₁ * z₂ * a = z₂ * z₁ * a := by rw [hz₁.comm]
_ = z₂ * (z₁ * a) := by rw [hz₁.mid_assoc z₂]
_ = (a * z₁) * z₂ := by rw [hz₁.comm, hz₂.comm]
_ = a * (z₁ * z₂) := by r... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Center.lean | {
"open": [],
"variables": [
"{M : Type*} {S T : Set M}",
"{a c : M} [Mul M]",
"[Mul M]",
"(M) in",
"(S) in"
]
} | [
{
"line": "rw [hz₁.comm]",
"before_state": "M : Type u_1\ninst✝¹ inst✝ : Mul M\nz₁ z₂ : M\nhz₁ : z₁ ∈ Set.center M\nhz₂ : z₂ ∈ Set.center M\na : M\n⊢ z₁ * z₂ * a = z₂ * z₁ * a",
"after_state": "No Goals!"
},
{
"line": "rewrite [hz₁.comm]",
"before_state": "M : Type u_1\ninst✝¹ inst✝ : Mul M\... |
lemma subset_centralizer_centralizer : S ⊆ S.centralizer.centralizer := by
intro x hx
simp only [Set.mem_centralizer_iff]
exact fun y hy => (hy x hx).symm
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Center.lean | {
"open": [],
"variables": [
"{M : Type*} {S T : Set M}",
"{a c : M} [Mul M]",
"[Mul M]",
"(M) in",
"(S) in"
]
} | [
{
"line": "intro x hx",
"before_state": "M : Type u_1\nS : Set M\ninst✝¹ inst✝ : Mul M\n⊢ S ⊆ S.centralizer.centralizer",
"after_state": "M : Type u_1\nS : Set M\ninst✝¹ inst✝ : Mul M\nx : M\nhx : x ∈ S\n⊢ x ∈ S.centralizer.centralizer"
},
{
"line": "intro x;\n intro hx",
"before_state": "M... |
lemma centralizer_centralizer_centralizer (S : Set M) :
S.centralizer.centralizer.centralizer = S.centralizer := by
refine Set.Subset.antisymm ?_ Set.subset_centralizer_centralizer
intro x hx
rw [Set.mem_centralizer_iff]
intro y hy
rw [Set.mem_centralizer_iff] at hx
exact hx y <| Set.subset_centralizer_... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Center.lean | {
"open": [],
"variables": [
"{M : Type*} {S T : Set M}",
"{a c : M} [Mul M]",
"[Mul M]",
"(M) in",
"(S) in"
]
} | [
{
"line": "refine Set.Subset.antisymm ?_ Set.subset_centralizer_centralizer",
"before_state": "M : Type u_1\ninst✝¹ inst✝ : Mul M\nS : Set M\n⊢ S.centralizer.centralizer.centralizer = S.centralizer",
"after_state": "M : Type u_1\ninst✝¹ inst✝ : Mul M\nS : Set M\n⊢ S.centralizer.centralizer.centralizer ⊆... |
theorem div_mem_center (ha : a ∈ Set.center M) (hb : b ∈ Set.center M) : a / b ∈ Set.center M := by
rw [div_eq_mul_inv]
exact mul_mem_center ha (inv_mem_center hb)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Center.lean | {
"open": [],
"variables": [
"{M : Type*} {S T : Set M}",
"{a c : M} [Mul M]",
"[Mul M]",
"(M) in",
"(S) in",
"[Semigroup M] {a b : M}",
"(M) in",
"[CommSemigroup M]",
"(M)",
"[MulOneClass M]",
"[Monoid M]",
"[DivisionMonoid M] {a b : M}"
]
} | [
{
"line": "rw [div_eq_mul_inv]",
"before_state": "M : Type u_1\ninst✝⁴ inst✝³ : Mul M\ninst✝² : MulOneClass M\ninst✝¹ : Monoid M\ninst✝ : DivisionMonoid M\na b : M\nha : a ∈ Set.center M\nhb : b ∈ Set.center M\n⊢ a / b ∈ Set.center M",
"after_state": "M : Type u_1\ninst✝⁴ inst✝³ : Mul M\ninst✝² : MulOne... |
theorem map_surjective {f : α →* β} (hf : Function.Surjective f) :
Function.Surjective (ConjClasses.map f) := by
intro b
obtain ⟨b, rfl⟩ := ConjClasses.mk_surjective b
obtain ⟨a, rfl⟩ := hf b
exact ⟨ConjClasses.mk a, rfl⟩
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Conj.lean | {
"open": [],
"variables": [
"{α : Type u} {β : Type v}",
"[Monoid α] [Monoid β]",
"[Group α]",
"[Monoid α] [Monoid β]"
]
} | [
{
"line": "intro b",
"before_state": "α : Type u\nβ : Type v\ninst✝⁴ : Monoid α\ninst✝³ : Monoid β\ninst✝² : Group α\ninst✝¹ : Monoid α\ninst✝ : Monoid β\nf : α →* β\nhf : Function.Surjective ⇑f\n⊢ Function.Surjective (ConjClasses.map f)",
"after_state": "α : Type u\nβ : Type v\ninst✝⁴ : Monoid α\ninst✝... |
lemma mul_of_commute (hab : Commute a b) (ha : IsIdempotentElem a) (hb : IsIdempotentElem b) :
IsIdempotentElem (a * b) := by rw [IsIdempotentElem, hab.symm.mul_mul_mul_comm, ha.eq, hb.eq]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Idempotent.lean | {
"open": [],
"variables": [
"{M N S : Type*}",
"[Mul M] {a : M}",
"[Semigroup S] {a b : S}"
]
} | [
{
"line": "rw [IsIdempotentElem, hab.symm.mul_mul_mul_comm, ha.eq, hb.eq]",
"before_state": "S : Type u_3\ninst✝ : Semigroup S\na b : S\nhab : Commute a b\nha : IsIdempotentElem a\nhb : IsIdempotentElem b\n⊢ IsIdempotentElem (a * b)",
"after_state": "No Goals!"
},
{
"line": "rewrite [IsIdempoten... |
lemma map {M N F} [Mul M] [Mul N] [FunLike F M N] [MulHomClass F M N] {e : M}
(he : IsIdempotentElem e) (f : F) : IsIdempotentElem (f e) := by
rw [IsIdempotentElem]
rw [← map_mul]
rw [he.eq]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Idempotent.lean | {
"open": [],
"variables": [
"{M N S : Type*}",
"[Mul M] {a : M}",
"[Semigroup S] {a b : S}",
"[CommSemigroup S] {a b : S}",
"[MulOneClass M] {a : M}",
"[Monoid M] {a : M}",
"[CancelMonoid M] {a : M}"
]
} | [
{
"line": "rw [IsIdempotentElem]",
"before_state": "M : Type u_4\nN : Type u_5\nF : Type u_6\ninst✝³ : Mul M\ninst✝² : Mul N\ninst✝¹ : FunLike F M N\ninst✝ : MulHomClass F M N\ne : M\nhe : IsIdempotentElem e\nf : F\n⊢ IsIdempotentElem (f e)",
"after_state": "M : Type u_4\nN : Type u_5\nF : Type u_6\nins... |
theorem mulIndicator_apply_eq_self : s.mulIndicator f a = f a ↔ a ∉ s → f a = 1 :=
letI := Classical.dec (a ∈ s)
ite_eq_left_iff.trans (by rw [@eq_comm _ (f a)])
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Indicator.lean | {
"open": [
"Function"
],
"variables": [
"{α β M N : Type*}",
"[One M] [One N] {s t : Set α} {f g : α → M} {a : α}"
]
} | [
{
"line": "rw [@eq_comm _ (f a)]",
"before_state": "α : Type u_1\nM : Type u_3\ninst✝ : One M\ns : Set α\nf : α → M\na : α\nthis : Decidable (a ∈ s) := Classical.dec (a ∈ s)\n⊢ a ∉ s → 1 = f a ↔ a ∉ s → f a = 1",
"after_state": "No Goals!"
},
{
"line": "rewrite [@eq_comm _ (f a)]",
"before_s... |
theorem mulIndicator_eq_mulIndicator {t : Set β} {g : β → M} {b : β}
(h1 : a ∈ s ↔ b ∈ t) (h2 : f a = g b) :
s.mulIndicator f a = t.mulIndicator g b := by
by_cases a ∈ s <;> simp_all
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Indicator.lean | {
"open": [
"Function"
],
"variables": [
"{α β M N : Type*}",
"[One M] [One N] {s t : Set α} {f g : α → M} {a : α}"
]
} | [
{
"line": "focus\n by_cases a ∈ s\n with_annotate_state\"<;>\" skip\n all_goals simp_all",
"before_state": "α : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝ : One M\ns : Set α\nf : α → M\na : α\nt : Set β\ng : β → M\nb : β\nh1 : a ∈ s ↔ b ∈ t\nh2 : f a = g b\n⊢ s.mulIndicator f a = t.mulIndicator g b",
... |
theorem comp_mulIndicator (h : M → β) (f : α → M) {s : Set α} {x : α} [DecidablePred (· ∈ s)] :
h (s.mulIndicator f x) = s.piecewise (h ∘ f) (const α (h 1)) x := by
letI := Classical.decPred (· ∈ s)
convert s.apply_piecewise f (const α 1) (fun _ => h) (x := x) using 2
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Indicator.lean | {
"open": [
"Function"
],
"variables": [
"{α β M N : Type*}",
"[One M] [One N] {s t : Set α} {f g : α → M} {a : α}",
"(M)",
"{M}"
]
} | [
{
"line": "letI := Classical.decPred (· ∈ s)",
"before_state": "α : Type u_1\nβ : Type u_2\nM : Type u_3\ninst✝¹ : One M\nh : M → β\nf : α → M\ns : Set α\nx : α\ninst✝ : DecidablePred fun x => x ∈ s\n⊢ h (s.mulIndicator f x) = s.piecewise (h ∘ f) (const α (h 1)) x",
"after_state": "α : Type u_1\nβ : Typ... |
theorem mulIndicator_mul_eq_left {f g : α → M} (h : Disjoint (mulSupport f) (mulSupport g)) :
(mulSupport f).mulIndicator (f * g) = f := by
refine (mulIndicator_congr fun x hx => ?_).trans mulIndicator_mulSupport
have : g x = 1 := nmem_mulSupport.1 (disjoint_left.1 h hx)
rw [Pi.mul_apply]
rw [this]
rw [mu... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Indicator.lean | {
"open": [
"Function",
"scoped symmDiff in"
],
"variables": [
"{α β M N : Type*}",
"[One M] [One N] {s t : Set α} {f g : α → M} {a : α}",
"(M)",
"{M}",
"[MulOneClass M] {s t : Set α} {a : α}"
]
} | [
{
"line": "refine (mulIndicator_congr fun x hx => ?_).trans mulIndicator_mulSupport",
"before_state": "α : Type u_1\nM : Type u_2\ninst✝ : MulOneClass M\nf g : α → M\nh : Disjoint (mulSupport f) (mulSupport g)\n⊢ (mulSupport f).mulIndicator (f * g) = f",
"after_state": "No Goals!"
}
] |
theorem mulIndicator_mul_eq_right {f g : α → M} (h : Disjoint (mulSupport f) (mulSupport g)) :
(mulSupport g).mulIndicator (f * g) = g := by
refine (mulIndicator_congr fun x hx => ?_).trans mulIndicator_mulSupport
have : f x = 1 := nmem_mulSupport.1 (disjoint_right.1 h hx)
rw [Pi.mul_apply]
rw [this]
rw [... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Indicator.lean | {
"open": [
"Function",
"scoped symmDiff in"
],
"variables": [
"{α β M N : Type*}",
"[One M] [One N] {s t : Set α} {f g : α → M} {a : α}",
"(M)",
"{M}",
"[MulOneClass M] {s t : Set α} {a : α}"
]
} | [
{
"line": "refine (mulIndicator_congr fun x hx => ?_).trans mulIndicator_mulSupport",
"before_state": "α : Type u_1\nM : Type u_2\ninst✝ : MulOneClass M\nf g : α → M\nh : Disjoint (mulSupport f) (mulSupport g)\n⊢ (mulSupport g).mulIndicator (f * g) = g",
"after_state": "No Goals!"
}
] |
theorem image_inter_mulSupport_eq {s : Set β} {g : β → α} :
g '' s ∩ mulSupport f = g '' (s ∩ mulSupport (f ∘ g)) := by
rw [mulSupport_comp_eq_preimage f g]
rw [image_inter_preimage]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Support.lean | {
"open": [
"Set",
"Function"
],
"variables": [
"{α β A B M M' N P G : Type*}",
"[One M] [One N] [One P]",
"[DivisionMonoid G] (f g : α → G)",
"{α β M : Type*} [One M] {f : α → M}"
]
} | [
{
"line": "rw [mulSupport_comp_eq_preimage f g]",
"before_state": "α : Type u_10\nβ : Type u_11\nM : Type u_12\ninst✝ : One M\nf : α → M\ns : Set β\ng : β → α\n⊢ g '' s ∩ mulSupport f = g '' (s ∩ mulSupport (f ∘ g))",
"after_state": "α : Type u_10\nβ : Type u_11\nM : Type u_12\ninst✝ : One M\nf : α → M\... |
example [Monoid α] : Monoid.toMulAction αᵐᵒᵖ = MulOpposite.instMulAction := by
with_reducible_and_instances rfl | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Opposite.lean | {
"open": [
"scoped RightActions",
"MulOpposite"
],
"variables": [
"{M N α β : Type*}",
"[SMul α β] [SMul αᵐᵒᵖ β] [VAdd α β] [VAdd αᵃᵒᵖ β] {a a₁ a₂ a₃ a₄ : α} {b : β}",
"[Monoid α] [MulAction αᵐᵒᵖ β]"
]
} | [
{
"line": "with_reducible_and_instances rfl",
"before_state": "M : Type u_1\nN : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝⁶ : SMul α β\ninst✝⁵ : SMul αᵐᵒᵖ β\ninst✝⁴ : VAdd α β\ninst✝³ : VAdd αᵃᵒᵖ β\na a₁ a₂ a₃ a₄ : α\nb : β\ninst✝² : Monoid α\ninst✝¹ : MulAction αᵐᵒᵖ β\ninst✝ : Monoid α\n⊢ Monoid.toMulAct... |
theorem smul_bijective {m : α} (hm : IsUnit m) :
Function.Bijective (fun (a : β) ↦ m • a) := by
lift m to αˣ using hm
exact MulAction.bijective m
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Basic.lean | {
"open": [],
"variables": [
"{G M A B α β : Type*}",
"[Group α] [MulAction α β]",
"[Monoid α] [MulAction α β] (c : α) (x y : β) [Invertible c]",
"{c x y}",
"{G A B : Type*} [DivisionMonoid G] [MulAction G A]",
"[Monoid M]",
"[Monoid α] [MulAction α β]"
]
} | [
{
"line": "lift m to αˣ using hm",
"before_state": "α : Type u_5\nβ : Type u_6\ninst✝⁵ : Group α\ninst✝⁴ : MulAction α β\ninst✝³ : Monoid α\ninst✝² : MulAction α β\ninst✝¹ : Monoid α\ninst✝ : MulAction α β\nm : α\nhm : IsUnit m\n⊢ Function.Bijective fun a => m • a",
"after_state": "case intro\nα : Type ... |
theorem restr_of_source_subset {f : Equidecomp X G} {A : Set X} (hA : f.source ⊆ A) :
f.restr A = f := by
apply toPartialEquiv_injective
rw [toPartialEquiv_restr]
rw [PartialEquiv.restr_eq_of_source_subset hA]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Equidecomp.lean | {
"open": [
"Function Set Pointwise PartialEquiv"
],
"variables": [
"{X G : Type*} {A B C : Set X}",
"[SMul G X]",
"(X G)",
"{X G}"
]
} | [
{
"line": "apply toPartialEquiv_injective",
"before_state": "X : Type u_1\nG : Type u_2\ninst✝ : SMul G X\nf : Equidecomp X G\nA : Set X\nhA : f.source ⊆ A\n⊢ f.restr A = f",
"after_state": "No Goals!"
}
] |
lemma faithfulSMul_at [∀ i, SMul M (α i)] [∀ i, Nonempty (α i)] (i : ι) [FaithfulSMul M (α i)] :
FaithfulSMul M (∀ i, α i) where
eq_of_smul_eq_smul h := eq_of_smul_eq_smul fun a : α i => by
classical
simpa using
congr_fun (h <| Function.update (fun j => Classical.choice (‹∀ i, Nonempty (α i)› j)) i ... | /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pi.lean | {
"open": [],
"variables": [
"{ι M N : Type*} {α β γ : ι → Type*} (i : ι)"
]
} | [
{
"line": "classical simpa using congr_fun (h <| Function.update (fun j => Classical.choice (‹∀ i, Nonempty (α i)› j)) i a) i",
"before_state": "ι : Type u_1\nM : Type u_2\nα : ι → Type u_4\ninst✝² : (i : ι) → SMul M (α i)\ninst✝¹ : ∀ (i : ι), Nonempty (α i)\ni : ι\ninst✝ : FaithfulSMul M (α i)\nm₁✝ m₂✝ : M... |
lemma inv_smul_finset_distrib (a : α) (s : Finset α) : (a • s)⁻¹ = op a⁻¹ • s⁻¹ := by
ext; simp [← inv_smul_mem_iff]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Finset.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped symmDiff in"
],
"variables": [
"{F α β γ : Type*}",
"[DecidableEq γ]",
"[DecidableEq β]",
"[Mul α] [DecidableEq α] {s t u : Finset α} {a : α}",
"[Semigroup α] [DecidableEq α]",
"[Mul α... | [
{
"line": "ext",
"before_state": "α : Type u_1\ninst✝⁸ : Mul α\ninst✝⁷ : DecidableEq α\ninst✝⁶ : Semigroup α\ninst✝⁵ : DecidableEq α\ninst✝⁴ : Mul α\ninst✝³ : IsLeftCancelMul α\ninst✝² : DecidableEq α\ninst✝¹ : Group α\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ (a • s)⁻¹ = op a⁻¹ • s⁻¹",
"after_stat... |
lemma inv_op_smul_finset_distrib (a : α) (s : Finset α) : (op a • s)⁻¹ = a⁻¹ • s⁻¹ := by
ext; simp [← inv_smul_mem_iff]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Finset.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped symmDiff in"
],
"variables": [
"{F α β γ : Type*}",
"[DecidableEq γ]",
"[DecidableEq β]",
"[Mul α] [DecidableEq α] {s t u : Finset α} {a : α}",
"[Semigroup α] [DecidableEq α]",
"[Mul α... | [
{
"line": "ext",
"before_state": "α : Type u_1\ninst✝⁸ : Mul α\ninst✝⁷ : DecidableEq α\ninst✝⁶ : Semigroup α\ninst✝⁵ : DecidableEq α\ninst✝⁴ : Mul α\ninst✝³ : IsLeftCancelMul α\ninst✝² : DecidableEq α\ninst✝¹ : Group α\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ (op a • s)⁻¹ = a⁻¹ • s⁻¹",
"after_stat... |
lemma smul_set_pi_of_isUnit {M ι : Type*} {α : ι → Type*} [Monoid M] [∀ i, MulAction M (α i)]
{c : M} (hc : IsUnit c) (I : Set ι) (s : ∀ i, Set (α i)) : c • I.pi s = I.pi (c • s) := by
lift c to Mˣ using hc
exact smul_set_pi c I s
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise"
],
"variables": [
"{F α β γ : Type*}"
]
} | [
{
"line": "lift c to Mˣ using hc",
"before_state": "M : Type u_5\nι : Type u_6\nα : ι → Type u_7\ninst✝¹ : Monoid M\ninst✝ : (i : ι) → MulAction M (α i)\nc : M\nhc : IsUnit c\nI : Set ι\ns : (i : ι) → Set (α i)\n⊢ c • I.pi s = I.pi (c • s)",
"after_state": "case intro\nM : Type u_5\nι : Type u_6\nα : ι ... |
lemma mem_smul_set_inv {s : Set α} : a ∈ b • s⁻¹ ↔ b ∈ a • s := by
simp [mem_smul_set_iff_inv_smul_mem]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped RightActions",
"scoped RightActions in"
],
"variables": [
"{F α β γ : Type*}",
"{ι : Sort*} {κ : ι → Sort*} [Mul α] {s s₁ s₂ t t₁ t₂ u : Set α} {a b : α}",
"[Semigroup α]",
"[Mul α] [IsLef... | [
{
"line": "simp [mem_smul_set_iff_inv_smul_mem]",
"before_state": "α : Type u_3\ninst✝⁴ : Mul α\ninst✝³ : Semigroup α\ninst✝² : Mul α\ninst✝¹ : IsLeftCancelMul α\ninst✝ : Group α\na b : α\ns : Set α\n⊢ a ∈ b • s⁻¹ ↔ b ∈ a • s",
"after_state": "No Goals!"
}
] |
lemma inv_smul_set_distrib (a : α) (s : Set α) : (a • s)⁻¹ = op a⁻¹ • s⁻¹ := by
ext; simp [mem_smul_set_iff_inv_smul_mem]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped RightActions",
"scoped RightActions in",
"scoped symmDiff in"
],
"variables": [
"{F α β γ : Type*}",
"{ι : Sort*} {κ : ι → Sort*} [Mul α] {s s₁ s₂ t t₁ t₂ u : Set α} {a b : α}",
"[Semigrou... | [
{
"line": "ext",
"before_state": "α : Type u_3\ninst✝⁴ : Mul α\ninst✝³ : Semigroup α\ninst✝² : Mul α\ninst✝¹ : IsLeftCancelMul α\ninst✝ : Group α\na : α\ns : Set α\n⊢ (a • s)⁻¹ = op a⁻¹ • s⁻¹",
"after_state": "case h\nα : Type u_3\ninst✝⁴ : Mul α\ninst✝³ : Semigroup α\ninst✝² : Mul α\ninst✝¹ : IsLeftCan... |
lemma inv_op_smul_set_distrib (a : α) (s : Set α) : (op a • s)⁻¹ = a⁻¹ • s⁻¹ := by
ext; simp [mem_smul_set_iff_inv_smul_mem]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped RightActions",
"scoped RightActions in",
"scoped symmDiff in"
],
"variables": [
"{F α β γ : Type*}",
"{ι : Sort*} {κ : ι → Sort*} [Mul α] {s s₁ s₂ t t₁ t₂ u : Set α} {a b : α}",
"[Semigrou... | [
{
"line": "ext",
"before_state": "α : Type u_3\ninst✝⁴ : Mul α\ninst✝³ : Semigroup α\ninst✝² : Mul α\ninst✝¹ : IsLeftCancelMul α\ninst✝ : Group α\na : α\ns : Set α\n⊢ (op a • s)⁻¹ = a⁻¹ • s⁻¹",
"after_state": "case h\nα : Type u_3\ninst✝⁴ : Mul α\ninst✝³ : Semigroup α\ninst✝² : Mul α\ninst✝¹ : IsLeftCan... |
lemma disjoint_smul_set_left : Disjoint (a • s) t ↔ Disjoint s (a⁻¹ • t) := by
simpa using disjoint_smul_set (a := a) (t := a⁻¹ • t)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped RightActions",
"scoped RightActions in",
"scoped symmDiff in"
],
"variables": [
"{F α β γ : Type*}",
"{ι : Sort*} {κ : ι → Sort*} [Mul α] {s s₁ s₂ t t₁ t₂ u : Set α} {a b : α}",
"[Semigrou... | [
{
"line": "simpa using disjoint_smul_set (a := a) (t := a⁻¹ • t)",
"before_state": "α : Type u_4\nβ : Type u_3\ninst✝⁵ : Mul α\ninst✝⁴ : Semigroup α\ninst✝³ : Mul α\ninst✝² : IsLeftCancelMul α\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns t : Set β\na : α\n⊢ Disjoint (a • s) t ↔ Disjoint s (a⁻¹ • t)",
"af... |
lemma disjoint_smul_set_right : Disjoint s (a • t) ↔ Disjoint (a⁻¹ • s) t := by
simpa using disjoint_smul_set (a := a) (s := a⁻¹ • s)
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Action/Pointwise/Set/Basic.lean | {
"open": [
"Function MulOpposite",
"scoped Pointwise",
"scoped RightActions in",
"scoped RightActions",
"scoped RightActions in",
"scoped symmDiff in"
],
"variables": [
"{F α β γ : Type*}",
"{ι : Sort*} {κ : ι → Sort*} [Mul α] {s s₁ s₂ t t₁ t₂ u : Set α} {a b : α}",
"[Semigrou... | [
{
"line": "simpa using disjoint_smul_set (a := a) (s := a⁻¹ • s)",
"before_state": "α : Type u_4\nβ : Type u_3\ninst✝⁵ : Mul α\ninst✝⁴ : Semigroup α\ninst✝³ : Mul α\ninst✝² : IsLeftCancelMul α\ninst✝¹ : Group α\ninst✝ : MulAction α β\ns t : Set β\na : α\n⊢ Disjoint s (a • t) ↔ Disjoint (a⁻¹ • s) t",
"af... |
lemma lt_one_iff {n : ℕ} (x : Fin (n + 2)) : x < 1 ↔ x = 0 := by
simp [lt_iff_val_lt_val]
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Fin/Basic.lean | {
"open": [
"Nat"
],
"variables": [
"{n : ℕ}"
]
} | [
{
"line": "simp [lt_iff_val_lt_val]",
"before_state": "n : ℕ\nx : Fin (n + 2)\n⊢ x < 1 ↔ x = 0",
"after_state": "No Goals!"
}
] |
lemma lt_sub_one_iff {k : Fin (n + 2)} : k < k - 1 ↔ k = 0 := by
simp
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Fin/Basic.lean | {
"open": [
"Nat"
],
"variables": [
"{n : ℕ}"
]
} | [
{
"line": "simp",
"before_state": "n : ℕ\nk : Fin (n + 2)\n⊢ k < k - 1 ↔ k = 0",
"after_state": "No Goals!"
}
] |
lemma isUnit_eq_one_or (hu : IsUnit u) : u = 1 ∨ u = -1 := by
simpa only [natAbs_of_isUnit hu] using natAbs_eq u
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Int/Units.lean | {
"open": [
"Nat"
],
"variables": [
"{u v : ℤ}"
]
} | [
{
"line": "simpa only [natAbs_of_isUnit hu] using natAbs_eq u",
"before_state": "u : ℤ\nhu : IsUnit u\n⊢ u = 1 ∨ u = -1",
"after_state": "No Goals!"
}
] |
lemma isUnit_ne_iff_eq_neg (hu : IsUnit u) (hv : IsUnit v) : u ≠ v ↔ u = -v := by
obtain rfl | rfl := isUnit_eq_one_or hu <;> obtain rfl | rfl := isUnit_eq_one_or hv <;> decide
| /root/DuelModelResearch/mathlib4/Mathlib/Algebra/Group/Int/Units.lean | {
"open": [
"Nat"
],
"variables": [
"{u v : ℤ}"
]
} | [
{
"line": "focus\n obtain rfl | rfl := isUnit_eq_one_or hu <;> obtain rfl | rfl := isUnit_eq_one_or hv\n with_annotate_state\"<;>\" skip\n all_goals decide",
"before_state": "u v : ℤ\nhu : IsUnit u\nhv : IsUnit v\n⊢ u ≠ v ↔ u = -v",
"after_state": "No Goals!"
},
{
"line": "focus\n obtain rfl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.