tasksource/leandojo huggingface dataset:
Theorem: ContractingWith.aposteriori_dist_iterate_fixedPoint_le
File: Mathlib/Topology/MetricSpace/Contracting.lean

tactic: rw [iterate_succ']
state_before: α : Type u_1
inst✝² : MetricSpace α
K : ℝ≥0
f : α → α
hf : ContractingWith K f
inst✝¹ : Nonempty α
inst✝ : CompleteSpace α
x : α
n : ℕ
⊢ dist ((f^[n]) x) (fixedPoint f hf) ≤ dist ((f^[n]) x) ((f^[n + 1]) x) / (1 - ↑K)

tactic: apply hf.dist_fixedPoint_le
state_before: α : Type u_1
inst✝² : MetricSpace α
K : ℝ≥0
f : α → α
hf : ContractingWith K f
inst✝¹ : Nonempty α
inst✝ : CompleteSpace α
x : α
n : ℕ
⊢ dist ((f^[n]) x) (fixedPoint f hf) ≤ dist ((f^[n]) x) ((f ∘ f^[n]) x) / (1 - ↑K)
Theorem: Nat.sq_add_sq_zmodEq
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: rcases ZMod.sq_add_sq p x with ⟨a, b, hx⟩
state_before: K : Type ?u.853209
R : Type ?u.853212
p : ℕ
inst✝ : Fact (Prime p)
x : ℤ
⊢ ∃ a b, a ≤ p / 2 ∧ b ≤ p / 2 ∧ ↑a ^ 2 + ↑b ^ 2 ≡ x [ZMOD ↑p]

tactic: refine ⟨a.valMinAbs.natAbs, b.valMinAbs.natAbs, ZMod.natAbs_valMinAbs_le _,
  ZMod.natAbs_valMinAbs_le _, ?_⟩
state_before: case intro.intro
K : Type ?u.853209
R : Type ?u.853212
p : ℕ
inst✝ : Fact (Prime p)
x : ℤ
a b : ZMod p
hx : a ^ 2 + b ^ 2 = ↑x
⊢ ∃ a b, a ≤ p / 2 ∧ b ≤ p / 2 ∧ ↑a ^ 2 + ↑b ^ 2 ≡ x [ZMOD ↑p]

tactic: rw [← a.coe_valMinAbs, ← b.coe_valMinAbs] at hx
state_before: case intro.intro
K : Type ?u.853209
R : Type ?u.853212
p : ℕ
inst✝ : Fact (Prime p)
x : ℤ
a b : ZMod p
hx : a ^ 2 + b ^ 2 = ↑x
⊢ ↑(Int.natAbs (ZMod.valMinAbs a)) ^ 2 + ↑(Int.natAbs (ZMod.valMinAbs b)) ^ 2 ≡ x [ZMOD ↑p]

tactic: push_cast
state_before: case intro.intro
K : Type ?u.853209
R : Type ?u.853212
p : ℕ
inst✝ : Fact (Prime p)
x : ℤ
a b : ZMod p
hx : ↑(ZMod.valMinAbs a) ^ 2 + ↑(ZMod.valMinAbs b) ^ 2 = ↑x
⊢ ↑(Int.natAbs (ZMod.valMinAbs a)) ^ 2 + ↑(Int.natAbs (ZMod.valMinAbs b)) ^ 2 ≡ x [ZMOD ↑p]

tactic: rw [sq_abs, sq_abs, ← ZMod.int_cast_eq_int_cast_iff]
state_before: case intro.intro
K : Type ?u.853209
R : Type ?u.853212
p : ℕ
inst✝ : Fact (Prime p)
x : ℤ
a b : ZMod p
hx : ↑(ZMod.valMinAbs a) ^ 2 + ↑(ZMod.valMinAbs b) ^ 2 = ↑x
⊢ abs (ZMod.valMinAbs a) ^ 2 + abs (ZMod.valMinAbs b) ^ 2 ≡ x [ZMOD ↑p]

tactic: exact_mod_cast hx
state_before: case intro.intro
K : Type ?u.853209
R : Type ?u.853212
p : ℕ
inst✝ : Fact (Prime p)
x : ℤ
a b : ZMod p
hx : ↑(ZMod.valMinAbs a) ^ 2 + ↑(ZMod.valMinAbs b) ^ 2 = ↑x
⊢ ↑(ZMod.valMinAbs a ^ 2 + ZMod.valMinAbs b ^ 2) = ↑x
Theorem: BilinearForm.toMatrixAux_eq
File: Mathlib/LinearAlgebra/Matrix/BilinearForm.lean

tactic: rw [BilinForm.toMatrix_apply, BilinForm.toMatrixAux_apply]
state_before: R : Type ?u.1169905
M : Type ?u.1169908
inst✝¹⁷ : Semiring R
inst✝¹⁶ : AddCommMonoid M
inst✝¹⁵ : Module R M
R₁ : Type ?u.1169944
M₁ : Type ?u.1169947
inst✝¹⁴ : Ring R₁
inst✝¹³ : AddCommGroup M₁
inst✝¹² : Module R₁ M₁
R₂ : Type u_1
M₂ : Type u_2
inst✝¹¹ : CommSemiring R₂
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : Module R₂ M₂
R₃ : Type ?u.1170746
M₃ : Type ?u.1170749
inst✝⁸ : CommRing R₃
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : Module R₃ M₃
V : Type ?u.1171337
K : Type ?u.1171340
inst✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
n : Type u_3
o : Type ?u.1172557
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : DecidableEq n
b : Basis n R₂ M₂
B : BilinForm R₂ M₂
i j : n
⊢ ↑(toMatrixAux ↑b) B i j = ↑(BilinForm.toMatrix b) B i j
Theorem: Finsupp.erase_zero
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical rw [← support_eq_empty, support_erase, support_zero, erase_empty]
state_before: α : Type u_1
β : Type ?u.167346
γ : Type ?u.167349
ι : Type ?u.167352
M : Type u_2
M' : Type ?u.167358
N : Type ?u.167361
P : Type ?u.167364
G : Type ?u.167367
H : Type ?u.167370
R : Type ?u.167373
S : Type ?u.167376
inst✝ : Zero M
a : α
⊢ erase a 0 = 0

tactic: rw [← support_eq_empty, support_erase, support_zero, erase_empty]
state_before: α : Type u_1
β : Type ?u.167346
γ : Type ?u.167349
ι : Type ?u.167352
M : Type u_2
M' : Type ?u.167358
N : Type ?u.167361
P : Type ?u.167364
G : Type ?u.167367
H : Type ?u.167370
R : Type ?u.167373
S : Type ?u.167376
inst✝ : Zero M
a : α
⊢ erase a 0 = 0
Theorem: Finset.strongInduction_eq
File: Mathlib/Data/Finset/Card.lean

tactic: rw [strongInduction]
state_before: α : Type u_1
β : Type ?u.74113
s✝ t : Finset α
f : α → β
n : ℕ
p : Finset α → Sort u_2
H : (s : Finset α) → ((t : Finset α) → t ⊂ s → p t) → p s
s : Finset α
⊢ strongInduction H s = H s fun t x => strongInduction H t
Theorem: PowerSeries.coe_smul
File: Mathlib/RingTheory/LaurentSeries.lean

tactic: ext
state_before: R : Type u
R' : Type ?u.298758
inst✝³ : Semiring R
inst✝² : Ring R'
f g : PowerSeries R
f' g' : PowerSeries R'
S : Type u_1
inst✝¹ : Semiring S
inst✝ : Module R S
r : R
x : PowerSeries S
⊢ ↑(ofPowerSeries ℤ S) (r • x) = r • ↑(ofPowerSeries ℤ S) x

tactic: simp [coeff_coe, coeff_smul, smul_ite]
state_before: case coeff.h
R : Type u
R' : Type ?u.298758
inst✝³ : Semiring R
inst✝² : Ring R'
f g : PowerSeries R
f' g' : PowerSeries R'
S : Type u_1
inst✝¹ : Semiring S
inst✝ : Module R S
r : R
x : PowerSeries S
x✝ : ℤ
⊢ HahnSeries.coeff (↑(ofPowerSeries ℤ S) (r • x)) x✝ = HahnSeries.coeff (r • ↑(ofPowerSeries ℤ S) x) x✝
Theorem: Basis.tensorProduct_repr_tmul_apply
File: Mathlib/LinearAlgebra/TensorProductBasis.lean

tactic: simp [Basis.tensorProduct]
state_before: R : Type u_2
M : Type u_3
N : Type u_5
ι : Type u_1
κ : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
m : M
n : N
i : ι
j : κ
⊢ ↑(↑(tensorProduct b c).repr (m ⊗ₜ[R] n)) (i, j) = ↑(↑b.repr m) i * ↑(↑c.repr n) j
Theorem: PowerSeries.order_one
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: simpa using order_monomial_of_ne_zero 0 (1 : R) one_ne_zero
state_before: R : Type u_1
inst✝¹ : Semiring R
inst✝ : Nontrivial R
⊢ order 1 = 0
Theorem: MvPFunctor.const.mk_get
File: Mathlib/Data/PFunctor/Multivariate/Basic.lean

tactic: cases x
state_before: n m : ℕ
P : MvPFunctor n
A : Type u
α β : TypeVec n
x : Obj (const n A) α
⊢ mk n (get x) = x

tactic: dsimp [const.get, const.mk]
state_before: case mk
n m : ℕ
P : MvPFunctor n
A : Type u
α β : TypeVec n
fst✝ : (const n A).A
snd✝ : B (const n A) fst✝ ⟹ α
⊢ mk n (get { fst := fst✝, snd := snd✝ }) = { fst := fst✝, snd := snd✝ }

tactic: congr with (_⟨⟩)
state_before: case mk
n m : ℕ
P : MvPFunctor n
A : Type u
α β : TypeVec n
fst✝ : (const n A).A
snd✝ : B (const n A) fst✝ ⟹ α
⊢ { fst := fst✝, snd := fun x a => PEmpty.elim a } = { fst := fst✝, snd := snd✝ }
Theorem: LieIdeal.mem_map
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: apply LieSubmodule.subset_lieSpan
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I I₂ : LieIdeal R L
J : LieIdeal R L'
x : L
hx : x ∈ I
⊢ ↑f x ∈ map f I

tactic: use x
state_before: case a
R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I I₂ : LieIdeal R L
J : LieIdeal R L'
x : L
hx : x ∈ I
⊢ ↑f x ∈ ↑(Submodule.map (↑f) (↑R L I).toSubmodule)

tactic: exact ⟨hx, rfl⟩
state_before: case a
R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I I₂ : LieIdeal R L
J : LieIdeal R L'
x : L
hx : x ∈ I
⊢ x ∈ ↑(↑R L I).toSubmodule ∧ ↑↑f x = ↑f x
Theorem: deriv_inv
File: Mathlib/Analysis/Calculus/Deriv/Inv.lean

tactic: rcases eq_or_ne x 0 with (rfl | hne)
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
⊢ deriv (fun x => x⁻¹) x = -(x ^ 2)⁻¹

tactic: simp [deriv_zero_of_not_differentiableAt (mt differentiableAt_inv.1 (not_not.2 rfl))]
state_before: case inl
𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
s t : Set 𝕜
L : Filter 𝕜
⊢ deriv (fun x => x⁻¹) 0 = -(0 ^ 2)⁻¹

tactic: exact (hasDerivAt_inv hne).deriv
state_before: case inr
𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
hne : x ≠ 0
⊢ deriv (fun x => x⁻¹) x = -(x ^ 2)⁻¹
Theorem: Real.le_exp_log
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: by_cases h_zero : x = 0
state_before: x✝ y x : ℝ
⊢ x ≤ exp (log x)

tactic: rw [h_zero, log, dif_pos rfl, exp_zero]
state_before: case pos
x✝ y x : ℝ
h_zero : x = 0
⊢ x ≤ exp (log x)

tactic: exact zero_le_one
state_before: case pos
x✝ y x : ℝ
h_zero : x = 0
⊢ 0 ≤ 1

tactic: rw [exp_log_eq_abs h_zero]
state_before: case neg
x✝ y x : ℝ
h_zero : ¬x = 0
⊢ x ≤ exp (log x)

tactic: exact le_abs_self _
state_before: case neg
x✝ y x : ℝ
h_zero : ¬x = 0
⊢ x ≤ abs x
Theorem: Int.floor_natCast
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [le_floor, ← cast_ofNat, cast_le]
state_before: F : Type ?u.127287
α : Type u_1
β : Type ?u.127293
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a✝ : α
n : ℕ
a : ℤ
⊢ a ≤ ⌊↑n⌋ ↔ a ≤ ↑n
Theorem: Polynomial.eval_comp
File: Mathlib/Data/Polynomial/Eval.lean

tactic: induction p using Polynomial.induction_on' with
| h_add r s hr hs =>
  simp [add_comp, hr, hs]
| h_monomial n a =>
  simp
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : CommSemiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
⊢ eval x (comp p q) = eval (eval x q) p

tactic: simp [add_comp, hr, hs]
state_before: case h_add
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : CommSemiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
r s : R[X]
hr : eval x (comp r q) = eval (eval x q) r
hs : eval x (comp s q) = eval (eval x q) s
⊢ eval x (comp (r + s) q) = eval (eval x q) (r + s)

tactic: simp
state_before: case h_monomial
R : Type u
S : Type v
T : Type w
ι : Type y
a✝ b : R
m n✝ : ℕ
inst✝¹ : CommSemiring R
p q : R[X]
x : R
inst✝ : CommSemiring S
f : R →+* S
n : ℕ
a : R
⊢ eval x (comp (↑(monomial n) a) q) = eval (eval x q) (↑(monomial n) a)
Theorem: Int.shiftl_add
File: Mathlib/Data/Int/Bitwise.lean

tactic: dsimp
state_before: m n✝ k i n : ℕ
⊢ (fun n k i => shiftl (↑m) i = ↑(Nat.shiftr (Nat.shiftl m n) k)) (n + i) n ↑i

tactic: rw [← Nat.shiftl_sub, add_tsub_cancel_left]
state_before: m n✝ k i n : ℕ
⊢ ↑(Nat.shiftl m i) = ↑(Nat.shiftr (Nat.shiftl m (n + i)) n)

tactic: apply Nat.le_add_right
state_before: case a
m n✝ k i n : ℕ
⊢ n ≤ n + i

tactic: dsimp
state_before: m n✝ k i n : ℕ
⊢ (fun n k i => shiftl (↑m) i = ↑(Nat.shiftr (Nat.shiftl m n) k)) n (n + i + 1) -[i+1]

tactic: rw [add_assoc, Nat.shiftr_add, ← Nat.shiftl_sub, tsub_self] <;> rfl
state_before: m n✝ k i n : ℕ
⊢ shiftl ↑m -[i+1] = ↑(Nat.shiftr (Nat.shiftl m n) (n + i + 1))

tactic: rw [← Nat.shiftl'_sub, add_tsub_cancel_left]
state_before: m n✝ k i n : ℕ
⊢ Nat.shiftl' true m i = Nat.shiftr (Nat.shiftl' true m (n + i)) n

tactic: apply Nat.le_add_right
state_before: case a
m n✝ k i n : ℕ
⊢ n ≤ n + i

tactic: rw [add_assoc, Nat.shiftr_add, ← Nat.shiftl'_sub, tsub_self] <;> rfl
state_before: m n✝ k i n : ℕ
⊢ Nat.shiftr m (Nat.succ i) = Nat.shiftr (Nat.shiftl' true m n) (n + i + 1)
Theorem: Real.summable_nat_rpow
File: Mathlib/Analysis/PSeries.lean

tactic: rcases neg_surjective p with ⟨p, rfl⟩
state_before: p : ℝ
⊢ (Summable fun n => ↑n ^ p) ↔ p < -1

tactic: simp [rpow_neg]
state_before: case intro
p : ℝ
⊢ (Summable fun n => ↑n ^ (-p)) ↔ -p < -1
Theorem: Dfinsupp.mk_injective
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: intro x y H
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x : (i : ↑↑s✝) → β ↑i
i : ι
s : Finset ι
⊢ Function.Injective (mk s)

tactic: ext i
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x✝ : (i : ↑↑s✝) → β ↑i
i : ι
s : Finset ι
x y : (i : ↑↑s) → β ↑i
H : mk s x = mk s y
⊢ x = y

tactic: have h1 : (mk s x : ∀ i, β i) i = (mk s y : ∀ i, β i) i := by rw [H]
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x✝ : (i : ↑↑s✝) → β ↑i
i✝ : ι
s : Finset ι
x y : (i : ↑↑s) → β ↑i
H : mk s x = mk s y
i : ↑↑s
⊢ x i = y i

tactic: obtain ⟨i, hi : i ∈ s⟩ := i
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x✝ : (i : ↑↑s✝) → β ↑i
i✝ : ι
s : Finset ι
x y : (i : ↑↑s) → β ↑i
H : mk s x = mk s y
i : ↑↑s
h1 : ↑(mk s x) ↑i = ↑(mk s y) ↑i
⊢ x i = y i

tactic: dsimp only [mk_apply, Subtype.coe_mk] at h1
state_before: case h.mk
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x✝ : (i : ↑↑s✝) → β ↑i
i✝ : ι
s : Finset ι
x y : (i : ↑↑s) → β ↑i
H : mk s x = mk s y
i : ι
hi : i ∈ s
h1 : ↑(mk s x) ↑{ val := i, property := hi } = ↑(mk s y) ↑{ val := i, property := hi }
⊢ x { val := i, property := hi } = y { val := i, property := hi }

tactic: simpa only [dif_pos hi] using h1
state_before: case h.mk
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x✝ : (i : ↑↑s✝) → β ↑i
i✝ : ι
s : Finset ι
x y : (i : ↑↑s) → β ↑i
H : mk s x = mk s y
i : ι
hi : i ∈ s
h1 : (if H : i ∈ s then x { val := i, property := H } else 0) = if H : i ∈ s then y { val := i, property := H } else 0
⊢ x { val := i, property := hi } = y { val := i, property := hi }

tactic: rw [H]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s✝ : Finset ι
x✝ : (i : ↑↑s✝) → β ↑i
i✝ : ι
s : Finset ι
x y : (i : ↑↑s) → β ↑i
H : mk s x = mk s y
i : ↑↑s
⊢ ↑(mk s x) ↑i = ↑(mk s y) ↑i
Theorem: Matrix.mulVec_transpose
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.916196
m : Type u_1
n : Type u_2
o : Type ?u.916205
m' : o → Type ?u.916210
n' : o → Type ?u.916215
R : Type ?u.916218
S : Type ?u.916221
α : Type v
β : Type w
γ : Type ?u.916228
inst✝¹ : NonUnitalCommSemiring α
inst✝ : Fintype m
A : Matrix m n α
x : m → α
⊢ mulVec Aᵀ x = vecMul x A

tactic: apply dotProduct_comm
state_before: case h
l : Type ?u.916196
m : Type u_1
n : Type u_2
o : Type ?u.916205
m' : o → Type ?u.916210
n' : o → Type ?u.916215
R : Type ?u.916218
S : Type ?u.916221
α : Type v
β : Type w
γ : Type ?u.916228
inst✝¹ : NonUnitalCommSemiring α
inst✝ : Fintype m
A : Matrix m n α
x : m → α
x✝ : n
⊢ mulVec Aᵀ x x✝ = vecMul x A x✝
Theorem: Complex.cos_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by
  rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, MulZeroClass.zero_mul,
    add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub]
  field_simp only; congr 3; ring_nf
state_before: θ : ℂ
⊢ cos θ = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2

tactic: rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm]
state_before: θ : ℂ
h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1
⊢ cos θ = 0 ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2

tactic: refine' exists_congr fun x => _
state_before: θ : ℂ
h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1
⊢ (∃ n, 2 * I * θ = ↑π * I + ↑n * (2 * ↑π * I)) ↔ ∃ k, θ = (2 * ↑k + 1) * ↑π / 2

tactic: refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero)
state_before: θ : ℂ
h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1
x : ℤ
⊢ 2 * I * θ = ↑π * I + ↑x * (2 * ↑π * I) ↔ θ = (2 * ↑x + 1) * ↑π / 2

tactic: field_simp
state_before: θ : ℂ
h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1
x : ℤ
⊢ ↑π * I + ↑x * (2 * ↑π * I) = 2 * I * ((2 * ↑x + 1) * ↑π / 2)

tactic: ring
state_before: θ : ℂ
h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1
x : ℤ
⊢ (↑π * I + ↑x * (2 * ↑π * I)) * 2 = 2 * I * ((2 * ↑x + 1) * ↑π)

tactic: rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, MulZeroClass.zero_mul,
  add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub]
state_before: θ : ℂ
⊢ (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1

tactic: field_simp only
state_before: θ : ℂ
⊢ exp (θ * I - -θ * I) = -1 ↔ exp (2 * θ * I) = -1

tactic: congr 3
state_before: θ : ℂ
⊢ exp (θ * I - -θ * I) = -1 ↔ exp (2 * θ * I) = -1

tactic: ring_nf
state_before: θ : ℂ
⊢ exp (θ * I - -θ * I) = -1 ↔ exp (2 * θ * I) = -1
Theorem: MvPolynomial.coe_monomial
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [coeff_coe, coeff_monomial, MvPowerSeries.coeff_monomial]
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
n : σ →₀ ℕ
a : R
m : σ →₀ ℕ
⊢ ↑(MvPowerSeries.coeff R m) ↑(↑(monomial n) a) = ↑(MvPowerSeries.coeff R m) (↑(MvPowerSeries.monomial R n) a)

tactic: split_ifs with h₁ h₂ <;> first |rfl|subst m; contradiction
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
n : σ →₀ ℕ
a : R
m : σ →₀ ℕ
⊢ (if n = m then a else 0) = if m = n then a else 0

tactic: rfl
state_before: case inr.inr
σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
n : σ →₀ ℕ
a : R
m : σ →₀ ℕ
h₁ : ¬n = m
h✝ : ¬m = n
⊢ 0 = 0

tactic: subst m
state_before: case inr.inl
σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
n : σ →₀ ℕ
a : R
m : σ →₀ ℕ
h₁ : ¬n = m
h✝ : m = n
⊢ 0 = a

tactic: contradiction
state_before: case inr.inl
σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : MvPolynomial σ R
n : σ →₀ ℕ
a : R
h₁ : ¬n = n
⊢ 0 = a
Theorem: Range.isSubfield
File: Mathlib/Deprecated/Subfield.lean

tactic: rw [← Set.image_univ]
state_before: F : Type u_2
inst✝¹ : Field F
S : Set F
K : Type u_1
inst✝ : Field K
f : F →+* K
⊢ IsSubfield (Set.range ↑f)

tactic: apply Image.isSubfield _ Univ.isSubfield
state_before: F : Type u_2
inst✝¹ : Field F
S : Set F
K : Type u_1
inst✝ : Field K
f : F →+* K
⊢ IsSubfield (↑f '' Set.univ)
Theorem: Basis.dualBasis_apply_self
File: Mathlib/LinearAlgebra/Dual.lean

tactic: convert b.toDual_apply i j using 2
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ ↑(↑(dualBasis b) i) (↑b j) = if j = i then 1 else 0

tactic: rw [@eq_comm _ j i]
state_before: case h.e'_3.h₁.a
R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ j = i ↔ i = j
Theorem: Set.image_congr
File: Mathlib/Data/Set/Image.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
⊢ f '' s = g '' s

tactic: rw [mem_image, mem_image]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
x : β
⊢ x ∈ f '' s ↔ x ∈ g '' s

tactic: exact {
  mp := by
    rintro ⟨a, ha1, ha2⟩
    exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩,
  mpr := by
    rintro ⟨a, ha1, ha2⟩
    exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩
}
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
x : β
⊢ (∃ x_1, x_1 ∈ s ∧ f x_1 = x) ↔ ∃ x_1, x_1 ∈ s ∧ g x_1 = x

tactic: rintro ⟨a, ha1, ha2⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
x : β
⊢ (∃ x_1, x_1 ∈ s ∧ f x_1 = x) → ∃ x_1, x_1 ∈ s ∧ g x_1 = x

tactic: exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
x : β
a : α
ha1 : a ∈ s
ha2 : f a = x
⊢ ∃ x_1, x_1 ∈ s ∧ g x_1 = x

tactic: rintro ⟨a, ha1, ha2⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
x : β
⊢ (∃ x_1, x_1 ∈ s ∧ g x_1 = x) → ∃ x_1, x_1 ∈ s ∧ f x_1 = x

tactic: exact ⟨a, ⟨ha1, (h a ha1) ▸ ha2⟩⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.27036
ι : Sort ?u.27039
ι' : Sort ?u.27042
f✝ : α → β
s✝ t : Set α
f g : α → β
s : Set α
h : ∀ (a : α), a ∈ s → f a = g a
x : β
a : α
ha1 : a ∈ s
ha2 : g a = x
⊢ ∃ x_1, x_1 ∈ s ∧ f x_1 = x
Theorem: Nat.image_div_divisors_eq_divisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: by_cases hn : n = 0
state_before: n✝ n : ℕ
⊢ image (fun x => n / x) (divisors n) = divisors n

tactic: ext a
state_before: case neg
n✝ n : ℕ
hn : ¬n = 0
⊢ image (fun x => n / x) (divisors n) = divisors n

tactic: constructor
state_before: case neg.a
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ a ∈ image (fun x => n / x) (divisors n) ↔ a ∈ divisors n

tactic: simp [hn]
state_before: case pos
n✝ n : ℕ
hn : n = 0
⊢ image (fun x => n / x) (divisors n) = divisors n

tactic: rw [mem_image]
state_before: case neg.a.mp
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ a ∈ image (fun x => n / x) (divisors n) → a ∈ divisors n

tactic: rintro ⟨x, hx1, hx2⟩
state_before: case neg.a.mp
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ (∃ a_1, a_1 ∈ divisors n ∧ n / a_1 = a) → a ∈ divisors n

tactic: rw [mem_divisors] at *
state_before: case neg.a.mp.intro.intro
n✝ n : ℕ
hn : ¬n = 0
a x : ℕ
hx1 : x ∈ divisors n
hx2 : n / x = a
⊢ a ∈ divisors n

tactic: refine' ⟨_, hn⟩
state_before: case neg.a.mp.intro.intro
n✝ n : ℕ
hn : ¬n = 0
a x : ℕ
hx1 : x ∣ n ∧ n ≠ 0
hx2 : n / x = a
⊢ a ∣ n ∧ n ≠ 0

tactic: rw [← hx2]
state_before: case neg.a.mp.intro.intro
n✝ n : ℕ
hn : ¬n = 0
a x : ℕ
hx1 : x ∣ n ∧ n ≠ 0
hx2 : n / x = a
⊢ a ∣ n

tactic: exact div_dvd_of_dvd hx1.1
state_before: case neg.a.mp.intro.intro
n✝ n : ℕ
hn : ¬n = 0
a x : ℕ
hx1 : x ∣ n ∧ n ≠ 0
hx2 : n / x = a
⊢ n / x ∣ n

tactic: rw [mem_divisors, mem_image]
state_before: case neg.a.mpr
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ a ∈ divisors n → a ∈ image (fun x => n / x) (divisors n)

tactic: rintro ⟨h1, -⟩
state_before: case neg.a.mpr
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ a ∣ n ∧ n ≠ 0 → ∃ a_2, a_2 ∈ divisors n ∧ n / a_2 = a

tactic: exact ⟨n / a, mem_divisors.mpr ⟨div_dvd_of_dvd h1, hn⟩, Nat.div_div_self h1 hn⟩
state_before: case neg.a.mpr.intro
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
h1 : a ∣ n
⊢ ∃ a_1, a_1 ∈ divisors n ∧ n / a_1 = a
Theorem: isLittleO_rpow_exp_atTop
File: Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean

tactic: simpa only [one_mul] using isLittleO_rpow_exp_pos_mul_atTop s one_pos
state_before: s : ℝ
⊢ (fun x => x ^ s) =o[atTop] exp
Theorem: OrderIso.preimage_Icc
File: Mathlib/Data/Set/Intervals/OrderIso.lean

tactic: simp [← Ici_inter_Iic]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
a b : β
⊢ ↑e ⁻¹' Icc a b = Icc (↑(symm e) a) (↑(symm e) b)