Dataset Viewer
Auto-converted to Parquet
tactic
stringlengths
1
5.59k
name
stringlengths
1
937
haveDraft
stringlengths
1
44.5k
goal
stringlengths
7
61k
rintro @⟨⟨one₁⟩, ⟨mul₁⟩, one_mul₁, mul_one₁⟩ @⟨⟨one₂⟩, ⟨mul₂⟩, one_mul₂, mul_one₂⟩ ⟨rfl⟩
mk.mk.mk.mk.mk.mk.refl
(∀ (a : M), a * 1 = a) → (∀ (a : M), 1 * a = a) → ∀ (one₂_1 : M), (∀ (a : M), a * 1 = a) → (∀ (a : M), 1 * a = a) → ∀ (mul₁_1 : M → M → M) (one₁_1 : M), { one := one₁, mul := mul₁, one_mul := sorry, mul_one := sorry } = { one := one₂, mul := mul₁, one_mul := sorry, mul_one := sorry }
M : Type u ⊢ ∀ ⦃m₁ m₂ : MulOneClass M⦄, Mul.mul = Mul.mul → m₁ = m₂
suffices one₁ = one₂ by cases this; rfl
mk.mk.mk.mk.mk.mk.refl
one₁ = one₂
M : Type u one₁ : M mul₁ : M → M → M one_mul₁ : ∀ (a : M), 1 * a = a mul_one₁ : ∀ (a : M), a * 1 = a one₂ : M one_mul₂ : ∀ (a : M), 1 * a = a mul_one₂ : ∀ (a : M), a * 1 = a ⊢ { one := one₁, mul := mul₁, one_mul := sorry, mul_one := sorry } = { one := one₂, mul := mul₁, one_mul := sorry, mul_one := sorry }
cases this
refl
{ one := one₁, mul := mul₁, one_mul := sorry, mul_one := sorry } = { one := one₁, mul := mul₁, one_mul := sorry, mul_one := sorry }
M : Type u one₁ : M mul₁ : M → M → M one_mul₁ : ∀ (a : M), 1 * a = a mul_one₁ : ∀ (a : M), a * 1 = a one₂ : M one_mul₂ : ∀ (a : M), 1 * a = a mul_one₂ : ∀ (a : M), a * 1 = a this : one₁ = one₂ ⊢ { one := one₁, mul := mul₁, one_mul := sorry, mul_one := sorry } = { one := one₂, mul := mul₁, one_mul := sorry, mul_one := sorry }
obtain _ | n := n
zero
0 ≠ 0 → npowRec (m + 0) a = npowRec m a * npowRec 0 a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a ⊢ npowRec (m + n) a = npowRec m a * npowRec n a
obtain _ | n := n
succ
n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a zero : 0 ≠ 0 → npowRec (m + 0) a = npowRec m a * npowRec 0 a ⊢ npowRec (m + n) a = npowRec m a * npowRec n a
induction n with | zero => simp only [Nat.zero_add, npowRec, ha] | succ n ih => rw [← Nat.add_assoc, npowRec, ih n.succ_ne_zero]; simp only [npowRec, mul_assoc]
succ.zero
0 + 1 ≠ 0 → npowRec (m + (0 + 1)) a = npowRec m a * npowRec (0 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ hn : n + 1 ≠ 0 ⊢ npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a
induction n with | zero => simp only [Nat.zero_add, npowRec, ha] | succ n ih => rw [← Nat.add_assoc, npowRec, ih n.succ_ne_zero]; simp only [npowRec, mul_assoc]
succ.succ
n + 1 + 1 ≠ 0 → (n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a) → npowRec (m + (n + 1 + 1)) a = npowRec m a * npowRec (n + 1 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ hn : n + 1 ≠ 0 succ.zero : 0 + 1 ≠ 0 → npowRec (m + (0 + 1)) a = npowRec m a * npowRec (0 + 1) a ⊢ npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a
| zero =>
succ.succ
n + 1 + 1 ≠ 0 → (n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a) → npowRec (m + (n + 1 + 1)) a = npowRec m a * npowRec (n + 1 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a hn : 0 + 1 ≠ 0 ⊢ npowRec (m + (0 + 1)) a = npowRec m a * npowRec (0 + 1) a
| succ n ih =>
succ.zero
0 + 1 ≠ 0 → npowRec (m + (0 + 1)) a = npowRec m a * npowRec (0 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ ih : n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a hn : n + 1 + 1 ≠ 0 ⊢ npowRec (m + (n + 1 + 1)) a = npowRec m a * npowRec (n + 1 + 1) a
rw [← Nat.add_assoc, npowRec, ih n.succ_ne_zero]
succ.succ
npowRec m a * npowRec (n + 1) a * a = npowRec m a * npowRec (n + 1 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ ih : n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a hn : n + 1 + 1 ≠ 0 ⊢ npowRec (m + (n + 1 + 1)) a = npowRec m a * npowRec (n + 1 + 1) a
← Nat.add_assoc,
succ.succ
npowRec (m + (n + 1) + 1) a = npowRec m a * npowRec (n + 1 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ ih : n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a hn : n + 1 + 1 ≠ 0 ⊢ npowRec (m + (n + 1 + 1)) a = npowRec m a * npowRec (n + 1 + 1) a
npowRec,
succ.succ
npowRec (m + (n + 1)) a * a = npowRec m a * npowRec (n + 1 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ ih : n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a hn : n + 1 + 1 ≠ 0 ⊢ npowRec (m + (n + 1) + 1) a = npowRec m a * npowRec (n + 1 + 1) a
ih n.succ_ne_zero
succ.succ
npowRec m a * npowRec (n + 1) a * a = npowRec m a * npowRec (n + 1 + 1) a
M : Type u inst✝¹ : One M inst✝ : Semigroup M m : ℕ a : M ha : 1 * a = a n : ℕ ih : n + 1 ≠ 0 → npowRec (m + (n + 1)) a = npowRec m a * npowRec (n + 1) a hn : n + 1 + 1 ≠ 0 ⊢ npowRec (m + (n + 1)) a * a = npowRec m a * npowRec (n + 1 + 1) a
Nat.add_comm,
[anonymous]
npowRec (1 + n) a = a * npowRec n a
M : Type u inst✝¹ : One M inst✝ : Semigroup M n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a ⊢ npowRec (n + 1) a = a * npowRec n a
npowRec_add 1 n hn a ha,
[anonymous]
npowRec 1 a * npowRec n a = a * npowRec n a
M : Type u inst✝¹ : One M inst✝ : Semigroup M n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a ⊢ npowRec (1 + n) a = a * npowRec n a
npowRec,
[anonymous]
npowRec 0 a * a * npowRec n a = a * npowRec n a
M : Type u inst✝¹ : One M inst✝ : Semigroup M n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a ⊢ npowRec 1 a * npowRec n a = a * npowRec n a
npowRec,
[anonymous]
1 * a * npowRec n a = a * npowRec n a
M : Type u inst✝¹ : One M inst✝ : Semigroup M n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a ⊢ npowRec 0 a * a * npowRec n a = a * npowRec n a
ha
[anonymous]
a * npowRec n a = a * npowRec n a
M : Type u inst✝¹ : One M inst✝ : Semigroup M n : ℕ hn : n ≠ 0 a : M ha : 1 * a = a ⊢ 1 * a * npowRec n a = a * npowRec n a
induction k using Nat.strongRecOn with | ind k' ih => match k' with | 0 => rfl | 1 => simp [npowRec'] | k + 2 => simp [npowRec', ← mul_assoc, Nat.mul_add, ← ih]
ind
(∀ (m_1 : ℕ), m_1 < k' → npowRec' (2 * m_1) m = npowRec' m_1 (m * m)) → npowRec' (2 * k') m = npowRec' k' (m * m)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ m : M ⊢ npowRec' (2 * k) m = npowRec' k (m * m)
induction k using Nat.strongRecOn with | ind k' ih => match k' with | 1 => simp [npowRec', mul_assoc] | k + 2 => simp [npowRec', ← mul_assoc, ih]
ind
k' ≠ 0 → (∀ (m_1 : ℕ), m_1 < k' → m_1 ≠ 0 → m * npowRec' m_1 m = npowRec' m_1 m * m) → m * npowRec' k' m = npowRec' k' m * m
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ k0 : k ≠ 0 m : M ⊢ m * npowRec' k m = npowRec' k m * m
induction k using Nat.strongRecOn with | ind k' ih => match k' with | 0 => rfl | k + 1 => rw [npowRec, npowRec'_succ k.succ_ne_zero, ← mul_assoc] congr simp [ih]
ind
(∀ (m_1 : ℕ), m_1 < k' → npowRec (m_1 + 1) m = 1 * npowRec' (m_1 + 1) m) → npowRec (k' + 1) m = 1 * npowRec' (k' + 1) m
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ m : M ⊢ npowRec (k + 1) m = 1 * npowRec' (k + 1) m
rw [npowRec, npowRec'_succ k.succ_ne_zero, ← mul_assoc]
[anonymous]
npowRec (k + 1) m * m = 1 * npowRec' k.succ m * m
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M m : M k' k : ℕ ih : ∀ (m_1 : ℕ), m_1 < k + 1 → npowRec (m_1 + 1) m = 1 * npowRec' (m_1 + 1) m ⊢ npowRec (k + 1 + 1) m = 1 * npowRec' (k + 1 + 1) m
npowRec,
[anonymous]
npowRec (k + 1) m * m = 1 * npowRec' (k + 1 + 1) m
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M m : M k' k : ℕ ih : ∀ (m_1 : ℕ), m_1 < k + 1 → npowRec (m_1 + 1) m = 1 * npowRec' (m_1 + 1) m ⊢ npowRec (k + 1 + 1) m = 1 * npowRec' (k + 1 + 1) m
npowRec'_succ k.succ_ne_zero,
[anonymous]
npowRec (k + 1) m * m = 1 * (npowRec' k.succ m * m)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M m : M k' k : ℕ ih : ∀ (m_1 : ℕ), m_1 < k + 1 → npowRec (m_1 + 1) m = 1 * npowRec' (m_1 + 1) m ⊢ npowRec (k + 1) m * m = 1 * npowRec' (k + 1 + 1) m
← mul_assoc
[anonymous]
npowRec (k + 1) m * m = 1 * npowRec' k.succ m * m
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M m : M k' k : ℕ ih : ∀ (m_1 : ℕ), m_1 < k + 1 → npowRec (m_1 + 1) m = 1 * npowRec' (m_1 + 1) m ⊢ npowRec (k + 1) m * m = 1 * (npowRec' k.succ m * m)
congr
npowRec (k + 1) m = 1 * npowRec' k.succ m
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M m : M k' k : ℕ ih : ∀ (m_1 : ℕ), m_1 < k + 1 → npowRec (m_1 + 1) m = 1 * npowRec' (m_1 + 1) m ⊢ npowRec (k + 1) m * m = 1 * npowRec' k.succ m * m
unfold go
[anonymous]
Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) (k + 1) m n = m * npowRec' (k + 1) n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ m n : M ⊢ go (k + 1) m n = m * npowRec' (k + 1) n
generalize hk : k + 1 = k'
[anonymous]
k + 1 = k' → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ m n : M ⊢ Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) (k + 1) m n = m * npowRec' (k + 1) n
replace hk : k' ≠ 0 := by omega
[anonymous]
k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ m n : M k' : ℕ hk : k + 1 = k' ⊢ Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n
rw [Nat.binaryRec_eq _ _ (Or.inl rfl), ih _ _ k'0]
f
(bif b then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit b k') n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ b : Bool k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit b k' ≠ 0 ⊢ Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) (Nat.bit b k') m n = m * npowRec' (Nat.bit b k') n
Nat.binaryRec_eq _ _ (Or.inl rfl),
f
Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' (bif b then m * n else m) (n * n) = m * npowRec' (Nat.bit b k') n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ b : Bool k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit b k' ≠ 0 ⊢ Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) (Nat.bit b k') m n = m * npowRec' (Nat.bit b k') n
ih _ _ k'0
f
(bif b then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit b k') n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ b : Bool k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit b k' ≠ 0 ⊢ Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' (bif b then m * n else m) (n * n) = m * npowRec' (Nat.bit b k') n
cases b <;> simp only [Nat.bit, cond_false, cond_true, ← Nat.two_mul, npowRec'_two_mul]
f.true
Nat.bit true k' ≠ 0 → m * n * npowRec' k' (n * n) = m * npowRec' (2 * k' + 1) n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ b : Bool k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit b k' ≠ 0 ⊢ (bif b then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit b k') n
cases b
f.false
Nat.bit false k' ≠ 0 → (bif false then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit false k') n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ b : Bool k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit b k' ≠ 0 ⊢ (bif b then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit b k') n
cases b
f.true
Nat.bit true k' ≠ 0 → (bif true then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit true k') n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k : ℕ b : Bool k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit b k' ≠ 0 f.false : Nat.bit false k' ≠ 0 → (bif false then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit false k') n ⊢ (bif b then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit b k') n
simp only [Nat.bit, cond_false, cond_true, ← Nat.two_mul, npowRec'_two_mul]
f.true
m * n * npowRec' k' (n * n) = m * npowRec' (2 * k' + 1) n
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit true k' ≠ 0 ⊢ (bif true then m * n else m) * npowRec' k' (n * n) = m * npowRec' (Nat.bit true k') n
npowRec'_succ (by omega),
f.true
m * n * npowRec' k' (n * n) = m * (npowRec' (2 * k') n * n)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit true k' ≠ 0 ⊢ m * n * npowRec' k' (n * n) = m * npowRec' (2 * k' + 1) n
npowRec'_two_mul,
f.true
m * n * npowRec' k' (n * n) = m * (npowRec' k' (n * n) * n)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit true k' ≠ 0 ⊢ m * n * npowRec' k' (n * n) = m * (npowRec' (2 * k') n * n)
← npowRec'_two_mul,
f.true
m * n * npowRec' (2 * k') n = m * (npowRec' (2 * k') n * n)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit true k' ≠ 0 ⊢ m * n * npowRec' k' (n * n) = m * (npowRec' k' (n * n) * n)
← npowRec'_mul_comm (by omega),
f.true
m * n * npowRec' (2 * k') n = m * (n * npowRec' (2 * k') n)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit true k' ≠ 0 ⊢ m * n * npowRec' (2 * k') n = m * (npowRec' (2 * k') n * n)
mul_assoc
f.true
m * (n * npowRec' (2 * k') n) = m * (n * npowRec' (2 * k') n)
M : Type u_2 inst✝¹ : Semigroup M inst✝ : One M k k' : ℕ k'0 : k' ≠ 0 ih : ∀ (m n : M), k' ≠ 0 → Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) k' m n = m * npowRec' k' n m n : M hk : Nat.bit true k' ≠ 0 ⊢ m * n * npowRec' (2 * k') n = m * (n * npowRec' (2 * k') n)
funext M _ _ k m
h.h.h.h.h
∀ (m_1 : M) (k_1 : ℕ) (x : One M) (x : Semigroup M) (M_1 : Type u_2), npowRecAuto k m = npowBinRecAuto k m
⊢ @npowRecAuto = @npowBinRecAuto
rw [npowBinRecAuto, npowRecAuto, npowBinRec]
h.h.h.h.h
npowRec k m = npowBinRec.go k 1 m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ npowRecAuto k m = npowBinRecAuto k m
npowBinRecAuto,
h.h.h.h.h
npowRecAuto k m = npowBinRec k m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ npowRecAuto k m = npowBinRecAuto k m
npowRecAuto,
h.h.h.h.h
npowRec k m = npowBinRec k m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ npowRecAuto k m = npowBinRec k m
npowBinRec
h.h.h.h.h
npowRec k m = npowBinRec.go k 1 m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ npowRec k m = npowBinRec k m
npowRec,
[anonymous]
1 = npowBinRec.go 0 1 m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ npowRec 0 m = npowBinRec.go 0 1 m
npowBinRec.go,
[anonymous]
1 = Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) 0 1 m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ 1 = npowBinRec.go 0 1 m
Nat.binaryRec_zero
[anonymous]
1 = 1
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k : ℕ m : M ⊢ 1 = Nat.binaryRec (motive := fun x ↦ M → M → M) (fun y x ↦ y) (fun bn _n fn y x ↦ fn (bif bn then y * x else y) (x * x)) 0 1 m
npowBinRec.go_spec,
[anonymous]
npowRec (k + 1) m = 1 * npowRec' (k + 1) m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k✝ : ℕ m : M k : ℕ ⊢ npowRec (k + 1) m = npowBinRec.go (k + 1) 1 m
npowRec_eq
[anonymous]
1 * npowRec' (k + 1) m = 1 * npowRec' (k + 1) m
M : Type u_2 x✝¹ : Semigroup M x✝ : One M k✝ : ℕ m : M k : ℕ ⊢ npowRec (k + 1) m = 1 * npowRec' (k + 1) m
← one_mul c,
[anonymous]
b = 1 * c
M : Type u_2 inst✝ : Monoid M a b c : M hba : b * a = 1 hac : a * c = 1 ⊢ b = c
← hba,
[anonymous]
b = b * a * c
M : Type u_2 inst✝ : Monoid M a b c : M hba : b * a = 1 hac : a * c = 1 ⊢ b = 1 * c
mul_assoc,
[anonymous]
b = b * (a * c)
M : Type u_2 inst✝ : Monoid M a b c : M hba : b * a = 1 hac : a * c = 1 ⊢ b = b * a * c
hac,
[anonymous]
b = b * 1
M : Type u_2 inst✝ : Monoid M a b c : M hba : b * a = 1 hac : a * c = 1 ⊢ b = b * (a * c)
mul_one b
[anonymous]
b = b
M : Type u_2 inst✝ : Monoid M a b c : M hba : b * a = 1 hac : a * c = 1 ⊢ b = b * 1
pow_succ,
[anonymous]
a ^ 0 * a = a
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 1 = a
pow_zero,
[anonymous]
1 * a = a
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 0 * a = a
one_mul
[anonymous]
a = a
M : Type u_2 inst✝ : Monoid M a : M ⊢ 1 * a = a
pow_succ _ n,
[anonymous]
a ^ (n + 1 + 1) = a * (a ^ n * a)
M : Type u_2 inst✝ : Monoid M a : M n : ℕ ⊢ a ^ (n + 1 + 1) = a * a ^ (n + 1)
pow_succ,
[anonymous]
a ^ (n + 1) * a = a * (a ^ n * a)
M : Type u_2 inst✝ : Monoid M a : M n : ℕ ⊢ a ^ (n + 1 + 1) = a * (a ^ n * a)
pow_succ',
[anonymous]
a * a ^ n * a = a * (a ^ n * a)
M : Type u_2 inst✝ : Monoid M a : M n : ℕ ⊢ a ^ (n + 1) * a = a * (a ^ n * a)
mul_assoc
[anonymous]
a * (a ^ n * a) = a * (a ^ n * a)
M : Type u_2 inst✝ : Monoid M a : M n : ℕ ⊢ a * a ^ n * a = a * (a ^ n * a)
induction n with | zero => simp | succ n ih => simp [pow_succ', ← ih, Nat.mul_add, mul_assoc]
zero
(a * b) ^ 0 * a = a * (b * a) ^ 0
M : Type u_2 inst✝ : Monoid M a b : M n : ℕ ⊢ (a * b) ^ n * a = a * (b * a) ^ n
induction n with | zero => simp | succ n ih => simp [pow_succ', ← ih, Nat.mul_add, mul_assoc]
succ
(a * b) ^ n * a = a * (b * a) ^ n → (a * b) ^ (n + 1) * a = a * (b * a) ^ (n + 1)
M : Type u_2 inst✝ : Monoid M a b : M n : ℕ zero : (a * b) ^ 0 * a = a * (b * a) ^ 0 ⊢ (a * b) ^ n * a = a * (b * a) ^ n
| zero =>
succ
(a * b) ^ n * a = a * (b * a) ^ n → ∀ (n_1 : ℕ), (a * b) ^ (n + 1) * a = a * (b * a) ^ (n + 1)
M : Type u_2 inst✝ : Monoid M a b : M ⊢ (a * b) ^ 0 * a = a * (b * a) ^ 0
| succ n ih =>
zero
(a * b) ^ 0 * a = a * (b * a) ^ 0
M : Type u_2 inst✝ : Monoid M a b : M n : ℕ ih : (a * b) ^ n * a = a * (b * a) ^ n ⊢ (a * b) ^ (n + 1) * a = a * (b * a) ^ (n + 1)
← pow_succ,
[anonymous]
a ^ (n + 1) = a * a ^ n
M : Type u_2 inst✝ : Monoid M a : M n : ℕ ⊢ a ^ n * a = a * a ^ n
pow_succ'
[anonymous]
a * a ^ n = a * a ^ n
M : Type u_2 inst✝ : Monoid M a : M n : ℕ ⊢ a ^ (n + 1) = a * a ^ n
pow_succ,
[anonymous]
a ^ 1 * a = a * a
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 2 = a * a
pow_one
[anonymous]
a * a = a * a
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 1 * a = a * a
pow_succ,
[anonymous]
a ^ 2 * a = a * a * a
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 3 = a * a * a
pow_two
[anonymous]
a * a * a = a * a * a
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 2 * a = a * a * a
pow_succ',
[anonymous]
a * a ^ 2 = a * (a * a)
M : Type u_2 inst✝ : Monoid M a : M ⊢ a ^ 3 = a * (a * a)
pow_two
[anonymous]
a * (a * a) = a * (a * a)
M : Type u_2 inst✝ : Monoid M a : M ⊢ a * a ^ 2 = a * (a * a)
pow_succ,
[anonymous]
1 ^ n * 1 = 1
M : Type u_2 inst✝ : Monoid M n : ℕ ⊢ 1 ^ (n + 1) = 1
one_pow,
[anonymous]
1 * 1 = 1
M : Type u_2 inst✝ : Monoid M n : ℕ ⊢ 1 ^ n * 1 = 1
one_mul
[anonymous]
1 = 1
M : Type u_2 inst✝ : Monoid M n : ℕ ⊢ 1 * 1 = 1
Nat.add_zero,
[anonymous]
a ^ m = a ^ m * a ^ 0
M : Type u_2 inst✝ : Monoid M a : M m : ℕ ⊢ a ^ (m + 0) = a ^ m * a ^ 0
pow_zero,
[anonymous]
a ^ m = a ^ m * 1
M : Type u_2 inst✝ : Monoid M a : M m : ℕ ⊢ a ^ m = a ^ m * a ^ 0
mul_one
[anonymous]
a ^ m = a ^ m
M : Type u_2 inst✝ : Monoid M a : M m : ℕ ⊢ a ^ m = a ^ m * 1
pow_succ,
[anonymous]
a ^ (m + (n + 1)) = a ^ m * (a ^ n * a)
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + (n + 1)) = a ^ m * a ^ (n + 1)
← mul_assoc,
[anonymous]
a ^ (m + (n + 1)) = a ^ m * a ^ n * a
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + (n + 1)) = a ^ m * (a ^ n * a)
← pow_add,
[anonymous]
a ^ (m + (n + 1)) = a ^ (m + n) * a
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + (n + 1)) = a ^ m * a ^ n * a
← pow_succ,
[anonymous]
a ^ (m + (n + 1)) = a ^ (m + n + 1)
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + (n + 1)) = a ^ (m + n) * a
Nat.add_assoc
[anonymous]
a ^ (m + (n + 1)) = a ^ (m + (n + 1))
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + (n + 1)) = a ^ (m + n + 1)
← pow_add,
[anonymous]
a ^ (m + n) = a ^ n * a ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ m * a ^ n = a ^ n * a ^ m
← pow_add,
[anonymous]
a ^ (m + n) = a ^ (n + m)
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + n) = a ^ n * a ^ m
Nat.add_comm
[anonymous]
a ^ (n + m) = a ^ (n + m)
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m + n) = a ^ (n + m)
Nat.mul_zero,
[anonymous]
a ^ 0 = (a ^ m) ^ 0
M : Type u_2 inst✝ : Monoid M a : M m : ℕ ⊢ a ^ (m * 0) = (a ^ m) ^ 0
pow_zero,
[anonymous]
1 = (a ^ m) ^ 0
M : Type u_2 inst✝ : Monoid M a : M m : ℕ ⊢ a ^ 0 = (a ^ m) ^ 0
pow_zero
[anonymous]
1 = 1
M : Type u_2 inst✝ : Monoid M a : M m : ℕ ⊢ 1 = (a ^ m) ^ 0
Nat.mul_succ,
[anonymous]
a ^ (m * n + m) = (a ^ m) ^ (n + 1)
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m * (n + 1)) = (a ^ m) ^ (n + 1)
pow_add,
[anonymous]
a ^ (m * n) * a ^ m = (a ^ m) ^ (n + 1)
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m * n + m) = (a ^ m) ^ (n + 1)
pow_succ,
[anonymous]
a ^ (m * n) * a ^ m = (a ^ m) ^ n * a ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m * n) * a ^ m = (a ^ m) ^ (n + 1)
pow_mul
[anonymous]
(a ^ m) ^ n * a ^ m = (a ^ m) ^ n * a ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m * n) * a ^ m = (a ^ m) ^ n * a ^ m
Nat.mul_comm,
[anonymous]
a ^ (n * m) = (a ^ n) ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m * n) = (a ^ n) ^ m
pow_mul
[anonymous]
(a ^ n) ^ m = (a ^ n) ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (n * m) = (a ^ n) ^ m
← pow_mul,
[anonymous]
a ^ (m * n) = (a ^ n) ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ (a ^ m) ^ n = (a ^ n) ^ m
Nat.mul_comm,
[anonymous]
a ^ (n * m) = (a ^ n) ^ m
M : Type u_2 inst✝ : Monoid M a : M m n : ℕ ⊢ a ^ (m * n) = (a ^ n) ^ m
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
97