answer_id
int64 22
5.14k
| informal_proof
stringclasses 7
values | formal_proof
stringlengths 224
2.62k
| informal_statement
stringlengths 38
446
| task_id
int64 2
2.15k
| formal_statement
stringlengths 16
393
| problem_id
int64 1
3.32k
| header
stringclasses 1
value | passed
bool 1
class | validation_detail
stringclasses 9
values |
---|---|---|---|---|---|---|---|---|---|
856 | import Mathlib
example { G : Type* } [ Group G ] { M N : Subgroup G } ( hM : M.Normal ) ( hN : N.Normal ) ( h : M ⊓ N = ⊥ ) { a : G } ( ha : a ∈ M ) { b : G } ( hb : b ∈ N ) : a * b = b * a := by
have : (h : b * a * b⁻¹ * a⁻¹ = 1) → a * b = b * a := by
intro h
calc
_ = 1 * a * b := by group
_ = (b * a * b⁻¹ * a⁻¹) * a * b := by rw [← h]
_ = _ := by group
have α : b * a * b⁻¹ * a⁻¹ ∈ M := M.mul_mem (hM.conj_mem a ha b) (M.inv_mem ha)
have β : b * (a * b⁻¹ * a⁻¹) ∈ N := N.mul_mem hb (hN.conj_mem b⁻¹ (N.inv_mem hb) a)
repeat rw [← mul_assoc] at β
have γ : b * a * b⁻¹ * a⁻¹ ∈ M ⊓ N := ⟨α,β⟩
rw [h] at γ
have δ : b * a * b⁻¹ * a⁻¹ = 1 := by
exact γ
exact this δ
| Let $M$ and $N$ be normal subgroups of the group $G$. If $M \cap N = 1$, then for any $a \in M$ and $b \in N$, we have $ab = ba$. | 64 | import Mathlib
| 1,841 | import Mathlib | true | {"env": 0}
|
|
2,161 | import Mathlib
--1203
example {G : Type*} [Group G]: ∃! (le : G), ∃! (re : G), ∀ (g : G), le * g = g ∧ g * re = g := by
use 1
dsimp
constructor
· use 1
dsimp
constructor
· group
simp only [and_self, implies_true]
· intro y H
have : 1 * y = 1 := (H 1).2
calc
_ = 1 * y := by group
_ = _ := by rw[this]
· intro y h
rcases h with ⟨re,h1,_⟩
have l : y * 1 = 1 := (h1 1).1
rw[mul_one] at l
rw[l]
| Prove that a group have only one left identity element and only one right identity element. | 10 | import Mathlib
example {G : Type*} [Group G]: ∃! (le : G), ∃! (re : G), ∀ (g : G), le * g = g ∧ g * re = g := by sorry
| 18 | import Mathlib | true | {"env": 0}
|
|
694 | import Mathlib
def Func (S : Type*) := S → ℝ
instance (S : Type*) : Add (Func S) where
add := λ f g => λ x => f x + g x
instance (S : Type*) : Neg (Func S) where
neg := λ f => λ x => - f x
instance (S : Type*) : Zero (Func S) where
zero := λ _ => 0
instance (S : Type*) : AddGroup (Func S) := by
apply AddGroup.ofLeftAxioms
· intro f g h
funext x
exact add_assoc (f x) (g x) (h x)
· intro f
funext x
exact zero_add (f x)
· intro f
funext x
exact add_left_neg (f x) | Consider a set $S$, let $G:=\{f:S\to\mathbb R\}$ to be all maps from $S$ to $\mathbb R$. Then $G$ is a group under function addition. | 15 | import Mathlib.Tactic
import Mathlib.Algebra.Group.MinimalAxioms
def Func (S : Type*) := S → ℝ
instance (S : Type*) : Add (Func S) where
add := sorry
instance (S : Type*) : Neg (Func S) where
neg := sorry
instance (S : Type*) : Zero (Func S) where
zero := sorry
noncomputable instance (S : Type*) : AddGroup (Func S) := by
apply AddGroup.ofLeftAxioms
· sorry
· sorry
· sorry | 1 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 25, "column": 10},
"endPos": {"line": 25, "column": 22},
"data": "`add_left_neg` has been deprecated, use `neg_add_cancel` instead"}],
"env": 0}
|
|
83 | import Mathlib
-- 著者:秦宇轩
import Mathlib.Algebra.Group.Basic
import Mathlib.Tactic
-- Let `G` be a group.
-- Prove that `(a ^ {-1}) ^ {-1} = a` for any element `a ∈ G`.
example {G : Type*} [Group G] {a :G} : (a⁻¹)⁻¹ = a := by
group
| Let $G$ be a group. Prove that $\left(a^{-1}\right)^{-1}=a$ for any element $a\in G$. | 8 | import Mathlib
example {G : Type*}[Group G]{a :G}: (a⁻¹)⁻¹=a:=by sorry | 31 | import Mathlib | true | {"env": 0}
|
|
2,508 | Proof
1. For the first theorem, we use the theorem that m is larger or equal than 2 if m isn't 1 and isn't 0.
2. And then, the conclusion becomes obvious, for it is exactly h0 and h1.
3. For the example, we use the theorem that that there is a prime which n could be divided by if n is not 1.
4. And then use n is larger or equal to 2 to get n is not 1. This finishes the proof. | import Mathlib
theorem two_le {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := by
refine (Nat.two_le_iff m).mpr ?_
--For the first theorem, we use the theorem that m is larger or equal than 2 if m isn't 1 and isn't 0.
constructor
· exact h0
· exact h1
--And then, the conclusion becomes obvious, for it is exactly h0 and h1.
example {n : Nat} (h : 2 ≤ n) : ∃ p : Nat, p.Prime ∧ p ∣ n := by
refine Nat.exists_prime_and_dvd ?hn
--For the example, we use the theorem that that there is a prime which n could be divided by if n is not 1.
exact Ne.symm (Nat.ne_of_lt h)
--And then use n is larger or equal to 2 to get n is not 1. This finishes the proof. | Given an nature number $n$ which is not less than 2, prove either it is a prime or it can be divided by a prime nature number. | 78 | import Mathlib
theorem two_le {m : ℕ} (h0 : m ≠ 0) (h1 : m ≠ 1) : 2 ≤ m := sorry
example {n : Nat} (h : 2 ≤ n) : ∃ p : Nat, p.Prime ∧ p ∣ n := sorry
| 1,854 | import Mathlib | true | {"env": 0}
|
382 | import Mathlib
example {G : Type*} [Group G]: ∀ (g : G), ∃! (y : G), g * y = 1 := by
intro g
use g⁻¹
constructor
· apply mul_right_inv
intro y h
rw [← mul_right_inv g] at h
apply mul_left_cancel at h
exact h | Prove that in a group, every element has exactly one inverse. | 9 | import Mathlib
example {G : Type*} [Group G]: ∀ (g : G), ∃! (y : G), g * y = 1 := by sorry | 19 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 7, "column": 10},
"endPos": {"line": 7, "column": 23},
"data": "`mul_right_inv` has been deprecated, use `mul_inv_cancel` instead"},
{"severity": "warning",
"pos": {"line": 9, "column": 8},
"endPos": {"line": 9, "column": 21},
"data":
"`mul_right_inv` has been deprecated, use `mul_inv_cancel` instead"}],
"env": 0}
|
|
3,061 | Proof that if every element in a group \(G\) satisfies \(x \cdot x = 1\) for all \(x \in G\), then \(G\) is a commutative grouTo show that G is a commutative group, apply the constructor for CommGroup
a * b = a * b * (a * b) * (a * b)⁻¹ = 1 * (a * b)⁻¹
= b⁻¹ * (b⁻¹⁻¹ * b) * a = b⁻¹ * (b⁻¹⁻¹ * b) * (a * a * a⁻¹)
= 1 * (a * b)⁻¹ = b⁻¹ * 1 * (a * a * a⁻¹) = b⁻¹ * 1 * (1 * a⁻¹), the goal is changed to 1 * (a * b)⁻¹ = b⁻¹ * 1 * (1 * a⁻¹)
Conclude that G is a commutative group by using the group properties | import Mathlib.Tactic
example {G : Type*} [Group G] (h: ∀ (x : G), x * x = 1) : CommGroup G := by
-- To show that G is a commutative group, apply the constructor for CommGroup
apply CommGroup.mk
intro a b
-- a * b = a * b * (a * b) * (a * b)⁻¹ = 1 * (a * b)⁻¹
rw [← mul_inv_cancel_right (a * b) (a * b), h]
-- = b⁻¹ * (b⁻¹⁻¹ * b) * a = b⁻¹ * (b⁻¹⁻¹ * b) * (a * a * a⁻¹)
nth_rw 2 [← mul_inv_cancel_left b⁻¹ b, ← mul_inv_cancel_right a a]
-- = 1 * (a * b)⁻¹ = b⁻¹ * 1 * (a * a * a⁻¹) = b⁻¹ * 1 * (1 * a⁻¹), the goal is changed to 1 * (a * b)⁻¹ = b⁻¹ * 1 * (1 * a⁻¹)
rw [inv_inv, h, h]
-- Conclude that G is a commutative group by using the group properties
group | Show that every group $G$ with identity $e$ and such that $x * x=e$ for all $x \in G$ is Abelian. | 17 | import Mathlib
example {G : Type*} [Group G] (h: ∀ (x : G), x * x = 1) : CommGroup G := by sorry | 26 | import Mathlib | true | {"env": 0}
|
22 | import Mathlib
example {G : Type*} [Group G] (a b : G) (h : a * b = b * a⁻¹) : b * a = a⁻¹ * b := by
have h₀ : a⁻¹ * (a * b) * a = a⁻¹ * (b * a⁻¹) * a := by rw [h]
calc
_ = 1 * (b * a) := by rw [one_mul]
_ = a⁻¹ * a * (b * a) := by rw [← mul_left_inv]
_ = a⁻¹ * (a * b) * a := by rw [mul_assoc a⁻¹, ← mul_assoc a, ← mul_assoc]
_ = a⁻¹ * (b * a⁻¹) * a := by rw [h₀]
_ = a⁻¹ * b * (a⁻¹ * a) := by rw [mul_assoc, mul_assoc, ← mul_assoc]
_ = a⁻¹ * b * 1 := by rw [mul_left_inv]
_ = _ := by rw [mul_one] | Suppose that $G$ is a group and $a, b \in G$ satisfy $a * b=b * a^{-1}$. Prove that $b * a=a^{-1} * b$. | 2 | import Mathlib
example {G : Type*} [Group G] (a b : G) (h : a * b = b * a⁻¹) : b * a = a⁻¹ * b := sorry | 23 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 7, "column": 36},
"endPos": {"line": 7, "column": 48},
"data": "`mul_left_inv` has been deprecated, use `inv_mul_cancel` instead"},
{"severity": "warning",
"pos": {"line": 11, "column": 28},
"endPos": {"line": 11, "column": 40},
"data": "`mul_left_inv` has been deprecated, use `inv_mul_cancel` instead"}],
"env": 0}
|
|
1,639 | import Mathlib
example {G : Type*} [Group G] (h: ∀ (x : G), x * x = 1) : CommGroup G := {
mul_comm := by
intro a b
have h1 : (a * b) * (a * b) = 1 := by rw [h (a * b)]
apply (mul_left_inj (a * b)⁻¹).mpr at h1
rw [mul_assoc, mul_right_inv (a * b), mul_one, one_mul] at h1
rw [h1]
apply (mul_left_inj (a * b)).mp
group
rw [mul_assoc b a a, h]
group
rw [h]
} | Show that every group $G$ with identity $e$ and such that $x * x=e$ for all $x \in G$ is Abelian. | 17 | import Mathlib
example {G : Type*} [Group G] (h: ∀ (x : G), x * x = 1) : CommGroup G := by sorry | 26 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 8, "column": 19},
"endPos": {"line": 8, "column": 32},
"data":
"`mul_right_inv` has been deprecated, use `mul_inv_cancel` instead"}],
"env": 0}
|
|
1,912 | import Mathlib
example {G : Type*} [Group G] {x y : G}
(h : (x * y) * (x * y) = (x * x) * (y * y)): x * y = y * x := by
rw[←mul_assoc, ←mul_assoc] at h
have h1 : (x * y * x) * y * y⁻¹ = (x * x * y) * y * y⁻¹ := by
rw[h]
simp only [mul_inv_cancel_right] at h1
have h2 : x⁻¹ * (x * y * x) = x⁻¹ * (x * x * y) := by
rw[h1,← mul_assoc, ← mul_assoc]
rw[← mul_assoc,← mul_assoc,← mul_assoc,← mul_assoc] at h2
simp only [mul_left_inv, one_mul] at h2
exact id (Eq.symm h2) | Suppose that $G$ is a group with operation $\circ$; suppose that $x, y \in G$. Show that if
$$
(x \circ y) \circ(x \circ y)=(x \circ x) \circ(y \circ y),
$$
then $x \circ y=y \circ x$. | 7 | import Mathlib
example {G : Type*} [Group G] {x y : G} (h : (x * y) * (x * y) = (x * x) * (y * y)): x * y = y * x := by sorry | 25 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 12, "column": 13},
"endPos": {"line": 12, "column": 25},
"data": "`mul_left_inv` has been deprecated, use `inv_mul_cancel` instead"}],
"env": 0}
|
|
214 | import Mathlib
example {G : Type*} [Group G] (a b c : G) : ∃! x : G, a * x * b = c := by
use a⁻¹ * c * b⁻¹
constructor
. group
. intro x
intro h
have l : a⁻¹ * (a * x * b) * b⁻¹ = a⁻¹ * c * b⁻¹ := by
rw [h]
group at l
group
exact l | Suppose that $G$ is a group and $a, b, c\in G$. Prove that $a * x * b=c$ has a unique solution. | 6 | import Mathlib
example {G : Type*} [Group G] (a b c : G) : ∃! x : G, a * x * b = c := sorry | 22 | import Mathlib | true | {"env": 0}
|
|
4,583 | import Mathlib
example (n : ℕ) (k j : Fin n) :
MulAction.stabilizer (Equiv.Perm (Fin n)) k ≃ MulAction.stabilizer (Equiv.Perm (Fin n)) j where
toFun := by
intro α
use (Equiv.swap k j) * α * (Equiv.swap k j)
sorry
invFun := sorry
left_inv := sorry
right_inv := sorry | 16. Let $n$ be positive integer, and $k, j$ fixed integers with $1 \leq k, j \leq n$. Define the function $\Phi: \operatorname{Stab}(k) \rightarrow \operatorname{Stab}(j)$ on $\alpha \in \operatorname{Stab}(k)$ by setting $\Phi(\alpha)=(k j) \alpha(k j)$ (where $(k j)$ is the 2-cycle switching $k$ and $j$ ). Prove that $\Phi$ is a group isomorphism. Warning: An important verification is to check that $\Phi(\alpha) \in \operatorname{Stab}(j)$. | 900 | import Mathlib
| 1,005 | import Mathlib | true | {"sorries":
[{"proofState": 0,
"pos": {"line": 8, "column": 4},
"goal":
"case property\nn : ℕ\nk j : Fin n\nα : ↥(MulAction.stabilizer (Equiv.Perm (Fin n)) k)\n⊢ Equiv.swap k j * ↑α * Equiv.swap k j ∈ MulAction.stabilizer (Equiv.Perm (Fin n)) j",
"endPos": {"line": 8, "column": 9}},
{"proofState": 1,
"pos": {"line": 9, "column": 12},
"goal":
"n : ℕ\nk j : Fin n\n⊢ ↥(MulAction.stabilizer (Equiv.Perm (Fin n)) j) → ↥(MulAction.stabilizer (Equiv.Perm (Fin n)) k)",
"endPos": {"line": 9, "column": 17}},
{"proofState": 2,
"pos": {"line": 10, "column": 14},
"goal":
"n : ℕ\nk j : Fin n\n⊢ Function.LeftInverse\n (sorryAx (↥(MulAction.stabilizer (Equiv.Perm (Fin n)) j) → ↥(MulAction.stabilizer (Equiv.Perm (Fin n)) k))) fun α =>\n ⟨Equiv.swap k j * ↑α * Equiv.swap k j, ⋯⟩",
"endPos": {"line": 10, "column": 19}},
{"proofState": 3,
"pos": {"line": 11, "column": 15},
"goal":
"n : ℕ\nk j : Fin n\n⊢ Function.RightInverse\n (sorryAx (↥(MulAction.stabilizer (Equiv.Perm (Fin n)) j) → ↥(MulAction.stabilizer (Equiv.Perm (Fin n)) k))) fun α =>\n ⟨Equiv.swap k j * ↑α * Equiv.swap k j, ⋯⟩",
"endPos": {"line": 11, "column": 20}}],
"messages":
[{"severity": "warning",
"pos": {"line": 3, "column": 0},
"endPos": {"line": 3, "column": 7},
"data": "declaration uses 'sorry'"}],
"env": 0}
|
|
279 | import Mathlib
example {G : Type*} [Group G] {x y : G} (h : (x * y) * (x * y) = (x * x) * (y * y)): x * y = y * x := by
have lemma1 : x * y * x = x * x * y := by
calc
_ = (x * y) * (x * y) * y⁻¹ := by group
_ = (x * x) * (y * y) * y⁻¹ := by rw [h]
_ = _ := by group
calc
_ = x⁻¹ * (x * x * y) := by group
_ = x⁻¹ * (x * y * x) := by rw[lemma1]
_ = y * x := by group | Suppose that $G$ is a group with operation $\circ$; suppose that $x, y \in G$. Show that if
$$
(x \circ y) \circ(x \circ y)=(x \circ x) \circ(y \circ y),
$$
then $x \circ y=y \circ x$. | 7 | import Mathlib
example {G : Type*} [Group G] {x y : G} (h : (x * y) * (x * y) = (x * x) * (y * y)): x * y = y * x := by sorry | 25 | import Mathlib | true | {"env": 0}
|
|
1,460 | 1、证明x的存在性
2、证明x的唯一性 | import Mathlib
section Basic_Calculations
example {G : Type*} [Group G] (a b c : G) : ∃! x : G, a * x * b = c := by
·use a⁻¹ * c * b⁻¹
group
rw[true_and]
intro y h
calc
_ = a⁻¹ *(a*y*b)* b⁻¹ := by group
_ = _ := by simp[h]
| Suppose that $G$ is a group and $a, b,a_1,a_2 \in G$. Prove that $(bab^{-1})^{-1}=ba^{-1}b^{-1}$ and $(ba_1b^{-1})(ba_2b^{-1})=ba_1a_2b^{-1}$. | 5 | import Mathlib
example {G : Type*} [Group G] (a b a₁ a₂ : G) : (b * a * b⁻¹)⁻¹ = b * a⁻¹ * b⁻¹ ∧ (b * a₁ * b⁻¹) * (b * a₂ * b⁻¹) = b * a₁ * a₂ * b⁻¹ := sorry | 24 | import Mathlib | true | {"env": 0}
|
5,140 | We just enumerate all the conditions and use ‘decide’ to calculate the results.
| import Mathlib.Tactic
example : ∀ x : ZMod 7, 3 * x = 2 ↔ x = 3 := by
intro x
constructor
-- We start by simplifying the negation of the existential quantifier.
· by_contra h0
push_neg at h0
have h1 : 3 * x = 2 := h0.1
have h2 : x ≠ 3 := h0.2
absurd h1
-- We use pattern matching to check the equation for each possible value of x.
match x with
| 0 => decide
| 1 => decide
| 2 => decide
| 4 => decide
| 5 => decide
| 6 => decide
· intro h1
rw [h1]; decide
example : ∀ x : ZMod 23, 3 * x = 2 ↔ x = 16 := by
intro x
constructor
-- We start by simplifying the negation of the existential quantifier.
· by_contra h0
push_neg at h0
have h1 : 3 * x = 2 := h0.1
have h2 : x ≠ 16 := h0.2
absurd h1
by_cases l0 : x = 16
exact fun a ↦ h2 l0
-- As for the conditions that x ≠ 16, we can easily eliminate it.
fin_cases x <;> try decide
have := h0.2
contradiction
· intro h
rw [h]; decide | Solve the equation $3 x=2$ in the field $\mathbb{Z}/7\mathbb{Z}$ and in the field $\mathbb{Z}/23\mathbb{Z}$. | 2,149 | import Mathlib
| 3,324 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 33, "column": 14},
"endPos": {"line": 33, "column": 15},
"data":
"unused variable `a`\nnote: this linter can be disabled with `set_option linter.unusedVariables false`"}],
"env": 0}
|
1,677 | import Mathlib
-- 著者:秦宇轩
import Mathlib.Algebra.Group.Basic
import Mathlib.Tactic
import Init.Prelude
example {G : Type*} [Group G] (a : G) (k : ℕ) (h : Odd k) (pow_one : a ^ k = 1):
Odd (orderOf a) := by
have : (orderOf a) ∣ k := by
exact orderOf_dvd_of_pow_eq_one pow_one
exact Odd.of_dvd_nat h this
| Let $a$ be an element of a group $G$. If $a^{k}=e$ where $k$ is odd, then the order of $a$ is odd. | 28 | import Mathlib
example {G : Type*} [Group G] (a : G) (k : ℕ) (h : Odd k) (pow_one : a ^ k = 1): Odd (orderOf a) := by sorry | 1,838 | import Mathlib | true | {"env": 0}
|
|
2,151 | 1. We define a structure two_div_sum with two integer $x,y$ components and a proof $h$ that $2 ∣ x + y$.
2. The $Add$ on two_div_sum is defined as $(a+b).x=a.x+b.x, (a+b).y=a.y+b.y$ and $2 ∣ (a+b).x + (a+b).y$.
3. The $Neg$ on two_div_sum is defined as $(-a).x=-a.x, (-a).y=-a.y$ and $2 ∣ (-a).x + (-a).y$.
4. The $Zero$ on two_div_sum is defined as $0.x=0, 0.y=0$ and $2 ∣ 0.x + 0.y$.
5. We need prove that two_div_sum forms an additive group. Just need to prove the three axioms of additive group: associativity, identity element and inverse element. We prove these instance in its components, then is trival. | import Mathlib
-- Define a structure 'two_div_sum' with two integer $x,y$ components and a proof $h$ that $2 ∣ x + y$
@[ext]
structure two_div_sum where
x : ℤ
y : ℤ
h : 2 ∣ x + y
-- Define an 'Add' instance for 'two_div_sum' using the properties of integers
instance : Add two_div_sum where
add := by
-- Introduce two elements a and b of the structure
intro a b
-- Define the $sum.x$ as $a.x + b.x$
use a.x + b.x
-- Define the $sum.y$ as $a.y + b.y$
use a.y + b.y
-- Prove that $2 ∣ sum.x + sum.y$
have : a.x + b.x + (a.y + b.y) = a.x + a.y +(b.x + b.y) := by ring
rw [this]
apply dvd_add
· exact a.h
· exact b.h
-- Define a 'Neg' instance for 'two_div_sum' using the properties of integers
instance : Neg two_div_sum where
neg := by
-- Introduce an element a of the structure
intro a
-- Define the $neg.x$ as $-a.x$
use -a.x
-- Define the $neg.y$ as $-a.y$
use -a.y
-- Prove that $2 ∣ neg.x + neg.y$
rw [← neg_add]
apply Dvd.dvd.neg_right
exact a.h
-- Define a 'Zero' instance for 'two_div_sum' using the properties of integers
instance : Zero two_div_sum where
-- Define the zero element of the structure
zero := by
-- Define the $zero.x$ as $0$
use 0
-- Define the $zero.y$ as $0$
use 0
-- Prove that $2 ∣ zero.x + zero.y$
simp only [add_zero, dvd_zero]
-- Prove that 'two_div_sum' forms an additive group
instance : AddGroup two_div_sum := by
apply AddGroup.ofLeftAxioms
-- Prove that the addition operation is associative
· intro a b c
--Prove the equation in its components
ext
--Use the ring tactic to prove the equation
· calc
_ = a.x + b.x + c.x := by rfl
_ = a.x + (b.x + c.x) := by ring
_ = _ := by rfl
· calc
_ = a.y + b.y + c.y := by rfl
_ = a.y + (b.y + c.y) := by ring
_ = _ := by rfl
-- Prove that the zero element is the identity element
· intro a
--Prove the equation in its components
ext
--Use the ring tactic to prove the equation
· calc
_ = 0 + a.x := by rfl
_ = a.x := by ring
_ = _ := by rfl
· calc
_ = 0 + a.y := by rfl
_ = a.y := by ring
_ = _ := by rfl
-- Prove that the negation operation is the inverse operation
· intro a
----Use the ring tactic to prove the equation
ext
--Use the ring tactic to prove the equation
· calc
_ = -a.x + a.x := by rfl
_ = 0 := by ring
_ = _ := by rfl
· calc
_ = -a.y + a.y := by rfl
_ = 0 := by ring
_ = _ := by rfl | Prove that the elements $\{(x,y):x,y\in\mathbb Z, 2\mid x+y\}$ under elementwise addition is a group. | 55 | import Mathlib.Tactic
import Mathlib.Algebra.Group.MinimalAxioms
structure two_div_sum where
x : ℤ
y : ℤ
h : 2 ∣ x + y
instance : Add two_div_sum where
add := sorry
instance : Neg two_div_sum where
neg := sorry
instance : Zero two_div_sum where
zero := sorry
instance : AddGroup two_div_sum := by
apply AddGroup.ofLeftAxioms
· sorry
· sorry
· sorry | 8 | import Mathlib | true | {"env": 0}
|
2,905 | 1. first we show that order of g * a * g⁻¹ is 2
2. by calculation, (g * a * g⁻¹) ^ 2 = g * (a * a) * g⁻¹ = 1
3. so the order of g * a * g⁻¹ can only be 1 or 2, we show it is not 1. if so a = 1, which contradicts the assumption that order of a is 2
4. since a is the unique element with order 2, we have g * a * g⁻¹ = a, i.e. g * a = a * g, which is what we want to prove.
| import Mathlib.Tactic
example {G : Type*} [Group G] {a : G} (h₁: orderOf a = 2) (h₂: ∃! (x : G), orderOf x = 2) : ∀ x : G, a * x = x * a := by
intro g
rw [ExistsUnique] at h₂
rcases h₂ with ⟨x, ⟨ _ , hx2⟩⟩
have haa: a * a = 1 := by
calc
a * a = a ^ 2 := by exact Eq.symm (pow_two a)
_ = 1 := by rw [←h₁ ,pow_orderOf_eq_one a]
-- first we show that order of g * a * g⁻¹ is 2
have ho2: orderOf (g * a * g⁻¹) = 2 := by
rw [orderOf_eq_iff ]
constructor
-- by calculation, (g * a * g⁻¹) ^ 2 = g * (a * a) * g⁻¹ = 1
. calc
(g * a * g⁻¹) ^ 2 = (g * a * g⁻¹) * (g * a * g⁻¹) := by exact pow_two (g * a * g⁻¹)
_ = g * (a * a) * g⁻¹ := by group
_ = g * 1 * g⁻¹ := by rw [haa]
_ = 1 := by group
-- so the order of g * a * g⁻¹ can only be 1 or 2, we show it is not 1. if so a = 1, which contradicts the assumption that order of a is 2
. intro m hm2 h0m hf
have hm: m = 1 := by exact Nat.eq_of_le_of_lt_succ h0m hm2
rw [hm] at hf
have ha1: a = 1 := by
calc
a = g⁻¹ * (g * a * g⁻¹) ^ 1 * g := by group
_ = g⁻¹ * 1 * g := by rw [hf]
_ = 1 := by group
have hao1 : orderOf a = 1 := by exact orderOf_eq_one_iff.mpr ha1
have hn12: 1 ≠ 2 := by linarith
apply hn12
calc
1 = orderOf a := by rw [hao1]
_ = 2 := by rw [h₁]
simp only [Nat.ofNat_pos]
-- since a is the unique element with order 2, we have g * a * g⁻¹ = a, i.e. g * a = a * g, which is what we want to prove.
suffices g * a * g⁻¹ = x ∧ a = x by
calc
a * g = x * g := by rw [this.2]
_ = g * a * g⁻¹ * g := by rw [this.1]
_ = g * a := by group
constructor
. exact hx2 (g * a * g⁻¹) ho2
. exact hx2 a h₁ | Let $G$ be a group and suppose $a \in G$ generates a cyclic subgroup of order 2 and is the unique such element. Show that $a x=x a$ for all $x \in G$. [Hint: Consider $\left(x a x^{-1}\right)^{2}$.] | 33 | import Mathlib
example {G : Type*} [Group G] {a : G} (h₁: orderOf a = 2) (h₂: ∃! (x : G), orderOf x = 2) : ∀ x : G, a * x = x * a := by sorry | 102 | import Mathlib | true | {"env": 0}
|
923 | import Mathlib
instance {G : Type*} [Group G] (h : IsCyclic G) : CommGroup G := by
apply CommGroup.mk
intro a b
rcases h with ⟨t, ht⟩
rcases ht a with ⟨na, hna⟩
simp at hna
rcases ht b with ⟨nb, hnb⟩
simp at hnb
rw [← hna, ← hnb]
group | Every cyclic group is a abelian group. | 35 | import Mathlib
instance : sorry := sorry | 1,840 | import Mathlib | true | {"env": 0}
|
|
714 | import Mathlib
example {G : Type*} [Group G] (a b : G) (h : a * b = b * a⁻¹) : b * a = a⁻¹ * b := by
have h₁ : a * b * a = b := by
rw [h, mul_assoc, mul_left_inv, mul_one]
calc
_ = a⁻¹ * a * b * a := by
rw [mul_assoc, mul_left_inv, one_mul]
_ = _ := by
rw [mul_assoc,mul_assoc]
nth_rw 2 [← mul_assoc]
rw [h₁] | Suppose that $G$ is a group and $a, b \in G$ satisfy $a * b=b * a^{-1}$. Prove that $b * a=a^{-1} * b$. | 2 | import Mathlib
example {G : Type*} [Group G] (a b : G) (h : a * b = b * a⁻¹) : b * a = a⁻¹ * b := sorry | 23 | import Mathlib | true | {"messages":
[{"severity": "warning",
"pos": {"line": 5, "column": 22},
"endPos": {"line": 5, "column": 34},
"data": "`mul_left_inv` has been deprecated, use `inv_mul_cancel` instead"},
{"severity": "warning",
"pos": {"line": 8, "column": 21},
"endPos": {"line": 8, "column": 33},
"data": "`mul_left_inv` has been deprecated, use `inv_mul_cancel` instead"}],
"env": 0}
|
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 33