1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Denumerable.raise_lower
File: Mathlib/Logic/Equiv/List.lean

tactic: have : n ≤ m := List.rel_of_sorted_cons h _ (l.mem_cons_self _)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h : Sorted (fun x x_1 => x ≤ x_1) (n :: m :: l)
⊢ raise (lower (m :: l) n) n = m :: l
state_after: α : Type u_1
β : Type u_2
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h : Sorted (fun x x_1 => x ≤ x_1) (n :: m :: l)
this : n ≤ m
⊢ raise (lower (m :: l) n) n = m :: l

tactic: simp [raise, lower, Nat.sub_add_cancel this, raise_lower h.of_cons]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Denumerable α
inst✝ : Denumerable β
m : ℕ
l : List ℕ
n : ℕ
h : Sorted (fun x x_1 => x ≤ x_1) (n :: m :: l)
this : n ≤ m
⊢ raise (lower (m :: l) n) n = m :: l
state_after: no goals
Theorem: PowerBasis.dim_le_degree_of_root
File: Mathlib/RingTheory/PowerBasis.lean

tactic: rw [degree_eq_natDegree ne_zero]
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_4
B : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type u_6
inst✝¹ : Field K
inst✝ : Algebra A S
h : PowerBasis A S
p : A[X]
ne_zero : p ≠ 0
root : (aeval h.gen) p = 0
⊢ ↑h.dim ≤ p.degree
state_after: R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_4
B : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type u_6
inst✝¹ : Field K
inst✝ : Algebra A S
h : PowerBasis A S
p : A[X]
ne_zero : p ≠ 0
root : (aeval h.gen) p = 0
⊢ ↑h.dim ≤ ↑p.natDegree

tactic: exact WithBot.coe_le_coe.2 (h.dim_le_natDegree_of_root ne_zero root)
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Algebra R S
A : Type u_4
B : Type u_5
inst✝⁵ : CommRing A
inst✝⁴ : CommRing B
inst✝³ : IsDomain B
inst✝² : Algebra A B
K : Type u_6
inst✝¹ : Field K
inst✝ : Algebra A S
h : PowerBasis A S
p : A[X]
ne_zero : p ≠ 0
root : (aeval h.gen) p = 0
⊢ ↑h.dim ≤ ↑p.natDegree
state_after: no goals
Theorem: Real.logb_nonpos_iff_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [← not_lt, logb_pos_iff_of_base_lt_one b_pos b_lt_one hx, not_lt]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ logb b x ≤ 0 ↔ 1 ≤ x
state_after: no goals
Theorem: map_nhds_subtype_val
File: Mathlib/Topology/Constructions.lean

tactic: rw [inducing_subtype_val.map_nhds_eq, Subtype.range_val]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
p : X → Prop
s : Set X
x : ↑s
⊢ map Subtype.val (𝓝 x) = 𝓝[s] ↑x
state_after: no goals
Theorem: Nat.squarefree_mul
File: Mathlib/Data/Nat/Squarefree.lean

tactic: simp only [squarefree_iff_prime_squarefree, ← sq, ← forall_and]
state_before: s : Finset ℕ
m✝ n✝ p m n : ℕ
hmn : m.Coprime n
⊢ Squarefree (m * n) ↔ Squarefree m ∧ Squarefree n
state_after: s : Finset ℕ
m✝ n✝ p m n : ℕ
hmn : m.Coprime n
⊢ (∀ (x : ℕ), Prime x → ¬x ^ 2 ∣ m * n) ↔ ∀ (x : ℕ), Prime x → ¬x ^ 2 ∣ m ∧ ¬x ^ 2 ∣ n

tactic: refine forall₂_congr fun p hp => ?_
state_before: s : Finset ℕ
m✝ n✝ p m n : ℕ
hmn : m.Coprime n
⊢ (∀ (x : ℕ), Prime x → ¬x ^ 2 ∣ m * n) ↔ ∀ (x : ℕ), Prime x → ¬x ^ 2 ∣ m ∧ ¬x ^ 2 ∣ n
state_after: s : Finset ℕ
m✝ n✝ p✝ m n : ℕ
hmn : m.Coprime n
p : ℕ
hp : Prime p
⊢ ¬p ^ 2 ∣ m * n ↔ ¬p ^ 2 ∣ m ∧ ¬p ^ 2 ∣ n

tactic: simp only [hmn.isPrimePow_dvd_mul (hp.isPrimePow.pow two_ne_zero), not_or]
state_before: s : Finset ℕ
m✝ n✝ p✝ m n : ℕ
hmn : m.Coprime n
p : ℕ
hp : Prime p
⊢ ¬p ^ 2 ∣ m * n ↔ ¬p ^ 2 ∣ m ∧ ¬p ^ 2 ∣ n
state_after: no goals
Theorem: multiplicity.pow_multiplicity_dvd
File: Mathlib/RingTheory/Multiplicity.lean

tactic: rw [PartENat.natCast_get]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
h : Finite a b
⊢ ↑((multiplicity a b).get h) ≤ multiplicity a b
state_after: no goals
Theorem: Matrix.det_eq_of_eq_mul_det_one
File: Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean

tactic: rw [hC, mul_one]
state_before: m : Type u_1
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
A B C : Matrix n n R
hC : C.det = 1
hA : A = B * C
⊢ B.det * C.det = B.det
state_after: no goals
Theorem: fourier_add
File: Mathlib/Analysis/Fourier/AddCircle.lean

tactic: simp_rw [fourier_apply, add_zsmul, toCircle_add, coe_mul_unitSphere]
state_before: T : ℝ
m n : ℤ
x : AddCircle T
⊢ (fourier (m + n)) x = (fourier m) x * (fourier n) x
state_after: no goals
Theorem: Irreducible.hasSeparableContraction
File: Mathlib/RingTheory/Polynomial/SeparableDegree.lean

tactic: cases hF
state_before: F : Type u_1
inst✝ : Field F
q✝ : ℕ
f✝ : F[X]
hf : HasSeparableContraction q✝ f✝
q : ℕ
hF : ExpChar F q
f : F[X]
irred : Irreducible f
⊢ HasSeparableContraction q f
state_after: case zero
F : Type u_1
inst✝¹ : Field F
q : ℕ
f✝ : F[X]
hf : HasSeparableContraction q f✝
f : F[X]
irred : Irreducible f
inst✝ : CharZero F
⊢ HasSeparableContraction 1 f

case prime
F : Type u_1
inst✝ : Field F
q✝ : ℕ
f✝ : F[X]
hf : HasSeparableContraction q✝ f✝
q : ℕ
f : F[X]
irred : Irreducible f
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
⊢ HasSeparableContraction q f

tactic: exact ⟨f, irred.separable, ⟨0, by rw [pow_zero, expand_one]⟩⟩
state_before: case zero
F : Type u_1
inst✝¹ : Field F
q : ℕ
f✝ : F[X]
hf : HasSeparableContraction q f✝
f : F[X]
irred : Irreducible f
inst✝ : CharZero F
⊢ HasSeparableContraction 1 f
state_after: no goals

tactic: rw [pow_zero, expand_one]
state_before: F : Type u_1
inst✝¹ : Field F
q : ℕ
f✝ : F[X]
hf : HasSeparableContraction q f✝
f : F[X]
irred : Irreducible f
inst✝ : CharZero F
⊢ (expand F (1 ^ 0)) f = f
state_after: no goals

tactic: rcases exists_separable_of_irreducible q irred ‹q.Prime›.ne_zero with ⟨n, g, hgs, hge⟩
state_before: case prime
F : Type u_1
inst✝ : Field F
q✝ : ℕ
f✝ : F[X]
hf : HasSeparableContraction q✝ f✝
q : ℕ
f : F[X]
irred : Irreducible f
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
⊢ HasSeparableContraction q f
state_after: case prime.intro.intro.intro
F : Type u_1
inst✝ : Field F
q✝ : ℕ
f✝ : F[X]
hf : HasSeparableContraction q✝ f✝
q : ℕ
f : F[X]
irred : Irreducible f
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
n : ℕ
g : F[X]
hgs : g.Separable
hge : (expand F (q ^ n)) g = f
⊢ HasSeparableContraction q f

tactic: exact ⟨g, hgs, n, hge⟩
state_before: case prime.intro.intro.intro
F : Type u_1
inst✝ : Field F
q✝ : ℕ
f✝ : F[X]
hf : HasSeparableContraction q✝ f✝
q : ℕ
f : F[X]
irred : Irreducible f
hprime✝ : Nat.Prime q
hchar✝ : CharP F q
n : ℕ
g : F[X]
hgs : g.Separable
hge : (expand F (q ^ n)) g = f
⊢ HasSeparableContraction q f
state_after: no goals
Theorem: Trivialization.coordChangeL_apply'
File: Mathlib/Topology/VectorBundle/Basic.lean

tactic: rw [e.coordChangeL_apply e' hb, e.mk_symm hb.1]
state_before: R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : Semiring R
inst✝⁸ : TopologicalSpace F
inst✝⁷ : TopologicalSpace B
inst✝⁶ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F TotalSpace.proj
x : TotalSpace F E
b✝ : B
y✝ : E b✝
inst✝⁵ : AddCommMonoid F
inst✝⁴ : Module R F
inst✝³ : (x : B) → AddCommMonoid (E x)
inst✝² : (x : B) → Module R (E x)
e e' : Trivialization F TotalSpace.proj
inst✝¹ : Trivialization.IsLinear R e
inst✝ : Trivialization.IsLinear R e'
b : B
hb : b ∈ e.baseSet ∩ e'.baseSet
y : F
⊢ (coordChangeL R e e' b) y = (↑e' (↑e.symm (b, y))).2
state_after: no goals
Theorem: List.Ico.mem
File: Mathlib/Data/List/Intervals.lean

tactic: suffices n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m by simp [Ico, this]
state_before: n m l : ℕ
⊢ l ∈ Ico n m ↔ n ≤ l ∧ l < m
state_after: n m l : ℕ
⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m

tactic: rcases le_total n m with hnm | hmn
state_before: n m l : ℕ
⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m
state_after: case inl
n m l : ℕ
hnm : n ≤ m
⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m

case inr
n m l : ℕ
hmn : m ≤ n
⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m

tactic: simp [Ico, this]
state_before: n m l : ℕ
this : n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m
⊢ l ∈ Ico n m ↔ n ≤ l ∧ l < m
state_after: no goals

tactic: rw [Nat.add_sub_cancel' hnm]
state_before: case inl
n m l : ℕ
hnm : n ≤ m
⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m
state_after: no goals

tactic: rw [Nat.sub_eq_zero_iff_le.mpr hmn, Nat.add_zero]
state_before: case inr
n m l : ℕ
hmn : m ≤ n
⊢ n ≤ l ∧ l < n + (m - n) ↔ n ≤ l ∧ l < m
state_after: case inr
n m l : ℕ
hmn : m ≤ n
⊢ n ≤ l ∧ l < n ↔ n ≤ l ∧ l < m

tactic: exact
  and_congr_right fun hnl =>
    Iff.intro (fun hln => (not_le_of_gt hln hnl).elim) fun hlm => lt_of_lt_of_le hlm hmn
state_before: case inr
n m l : ℕ
hmn : m ≤ n
⊢ n ≤ l ∧ l < n ↔ n ≤ l ∧ l < m
state_after: no goals
Theorem: quotient_norm_add_le
File: Mathlib/Analysis/Normed/Group/Quotient.lean

tactic: rcases And.intro (mk_surjective x) (mk_surjective y) with ⟨⟨x, rfl⟩, ⟨y, rfl⟩⟩
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M ⧸ S
⊢ ‖x + y‖ ≤ ‖x‖ + ‖y‖
state_after: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ ‖↑x + ↑y‖ ≤ ‖↑x‖ + ‖↑y‖

tactic: simp only [← mk'_apply, ← map_add, quotient_norm_mk_eq, sInf_image']
state_before: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ ‖↑x + ↑y‖ ≤ ‖↑x‖ + ‖↑y‖
state_after: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ ⨅ a, ‖x + y + ↑a‖ ≤ (⨅ a, ‖x + ↑a‖) + ⨅ a, ‖y + ↑a‖

tactic: refine le_ciInf_add_ciInf fun a b ↦ ?_
state_before: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
⊢ ⨅ a, ‖x + y + ↑a‖ ≤ (⨅ a, ‖x + ↑a‖) + ⨅ a, ‖y + ↑a‖
state_after: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
a b : ↑↑S
⊢ ⨅ a, ‖x + y + ↑a‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖

tactic: refine ciInf_le_of_le ⟨0, forall_mem_range.2 fun _ ↦ norm_nonneg _⟩ (a + b) ?_
state_before: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
a b : ↑↑S
⊢ ⨅ a, ‖x + y + ↑a‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖
state_after: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
a b : ↑↑S
⊢ ‖x + y + ↑(a + b)‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖

tactic: exact (congr_arg norm (add_add_add_comm _ _ _ _)).trans_le (norm_add_le _ _)
state_before: case intro.intro.intro
M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
x y : M
a b : ↑↑S
⊢ ‖x + y + ↑(a + b)‖ ≤ ‖x + ↑a‖ + ‖y + ↑b‖
state_after: no goals
Theorem: Batteries.RBNode.size_eq
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: induction t <;> simp [*, size]
state_before: α : Type u_1
t : RBNode α
⊢ t.size = t.toList.length
state_after: case node
α : Type u_1
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
l_ih✝ : l✝.size = l✝.toList.length
r_ih✝ : r✝.size = r✝.toList.length
⊢ l✝.toList.length + r✝.toList.length + 1 = l✝.toList.length + (r✝.toList.length + 1)

tactic: rfl
state_before: case node
α : Type u_1
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
l_ih✝ : l✝.size = l✝.toList.length
r_ih✝ : r✝.size = r✝.toList.length
⊢ l✝.toList.length + r✝.toList.length + 1 = l✝.toList.length + (r✝.toList.length + 1)
state_after: no goals
Theorem: Prod.map_leftInverse
File: Mathlib/Data/Prod/Basic.lean

tactic: inhabit δ
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Nonempty β
inst✝ : Nonempty δ
f₁ : α → β
g₁ : γ → δ
f₂ : β → α
g₂ : δ → γ
h : LeftInverse (map f₁ g₁) (map f₂ g₂)
b : β
⊢ f₁ (f₂ b) = b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Nonempty β
inst✝ : Nonempty δ
f₁ : α → β
g₁ : γ → δ
f₂ : β → α
g₂ : δ → γ
h : LeftInverse (map f₁ g₁) (map f₂ g₂)
b : β
inhabited_h : Inhabited δ
⊢ f₁ (f₂ b) = b

tactic: exact congr_arg Prod.fst (h (b, default))
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Nonempty β
inst✝ : Nonempty δ
f₁ : α → β
g₁ : γ → δ
f₂ : β → α
g₂ : δ → γ
h : LeftInverse (map f₁ g₁) (map f₂ g₂)
b : β
inhabited_h : Inhabited δ
⊢ f₁ (f₂ b) = b
state_after: no goals

tactic: inhabit β
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Nonempty β
inst✝ : Nonempty δ
f₁ : α → β
g₁ : γ → δ
f₂ : β → α
g₂ : δ → γ
h : LeftInverse (map f₁ g₁) (map f₂ g₂)
d : δ
⊢ g₁ (g₂ d) = d
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Nonempty β
inst✝ : Nonempty δ
f₁ : α → β
g₁ : γ → δ
f₂ : β → α
g₂ : δ → γ
h : LeftInverse (map f₁ g₁) (map f₂ g₂)
d : δ
inhabited_h : Inhabited β
⊢ g₁ (g₂ d) = d

tactic: exact congr_arg Prod.snd (h (default, d))
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : Nonempty β
inst✝ : Nonempty δ
f₁ : α → β
g₁ : γ → δ
f₂ : β → α
g₂ : δ → γ
h : LeftInverse (map f₁ g₁) (map f₂ g₂)
d : δ
inhabited_h : Inhabited β
⊢ g₁ (g₂ d) = d
state_after: no goals
Theorem: Multiset.card_Icc
File: Mathlib/Data/Multiset/Interval.lean

tactic: simp_rw [Icc_eq, Finset.card_map, DFinsupp.card_Icc, Nat.card_Icc, Multiset.toDFinsupp_apply,
  toDFinsupp_support]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Multiset α
⊢ (Finset.Icc s t).card = ∏ i ∈ s.toFinset ∪ t.toFinset, (count i t + 1 - count i s)
state_after: no goals
Theorem: Basis.dualBasis_repr
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [← total_dualBasis b, Basis.total_repr b.dualBasis l]
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
l : Dual R M
i : ι
⊢ (b.dualBasis.repr l) i = l (b i)
state_after: no goals
Theorem: Coheyting.boundary_idem
File: Mathlib/Order/Heyting/Boundary.lean

tactic: rw [boundary, hnot_boundary, inf_top_eq]
state_before: α : Type u_1
inst✝ : CoheytingAlgebra α
a✝ b a : α
⊢ ∂ ∂ a = ∂ a
state_after: no goals
Theorem: IsBoundedLinearMap.sub
File: Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean

tactic: simpa [sub_eq_add_neg] using add hf (neg hg)
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
hf : IsBoundedLinearMap 𝕜 f
hg : IsBoundedLinearMap 𝕜 g
⊢ IsBoundedLinearMap 𝕜 fun e => f e - g e
state_after: no goals
Theorem: Set.Nonempty.smul_zero
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: simpa [mem_smul] using hs
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : Zero β
inst✝ : SMulZeroClass α β
s : Set α
t : Set β
a : α
hs : s.Nonempty
⊢ 0 ⊆ s • 0
state_after: no goals
Theorem: Complex.sin_eq_zero_iff_cos_eq
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← mul_self_eq_one_iff, ← sin_sq_add_cos_sq, sq, sq, ← sub_eq_iff_eq_add, sub_self]
state_before: z : ℂ
⊢ sin z = 0 ↔ cos z = 1 ∨ cos z = -1
state_after: z : ℂ
⊢ sin z = 0 ↔ 0 = sin z * sin z

tactic: exact ⟨fun h => by rw [h, mul_zero], eq_zero_of_mul_self_eq_zero ∘ Eq.symm⟩
state_before: z : ℂ
⊢ sin z = 0 ↔ 0 = sin z * sin z
state_after: no goals

tactic: rw [h, mul_zero]
state_before: z : ℂ
h : sin z = 0
⊢ 0 = sin z * sin z
state_after: no goals
Theorem: CircleDeg1Lift.map_lt_add_floor_translationNumber_add_one
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: rw [add_assoc]
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ f x < x + ↑⌊τ f⌋ + 1
state_after: f g : CircleDeg1Lift
x : ℝ
⊢ f x < x + (↑⌊τ f⌋ + 1)

tactic: norm_cast
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ f x < x + (↑⌊τ f⌋ + 1)
state_after: f g : CircleDeg1Lift
x : ℝ
⊢ f x < x + ↑(⌊τ f⌋ + 1)

tactic: refine map_lt_of_translationNumber_lt_int _ ?_ _
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ f x < x + ↑(⌊τ f⌋ + 1)
state_after: f g : CircleDeg1Lift
x : ℝ
⊢ τ f < ↑(⌊τ f⌋ + 1)

tactic: push_cast
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ τ f < ↑(⌊τ f⌋ + 1)
state_after: f g : CircleDeg1Lift
x : ℝ
⊢ τ f < ↑⌊τ f⌋ + 1

tactic: exact lt_floor_add_one _
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ τ f < ↑⌊τ f⌋ + 1
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: simp_rw [restrict, restrictₗ, liftLinear, LinearMap.coe_mk, AddHom.coe_mk,
  toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, μ.trimmed]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
h : MeasurableSet s
⊢ (μ.restrict s).toOuterMeasure = (OuterMeasure.restrict s) μ.toOuterMeasure
state_after: no goals
Theorem: Set.encard_singleton
File: Mathlib/Data/Set/Card.lean

tactic: rw [encard, ← PartENat.withTopEquiv.symm.injective.eq_iff, Equiv.symm_apply_apply,
  PartENat.card_eq_coe_fintype_card, Fintype.card_ofSubsingleton, Nat.cast_one]
state_before: α : Type u_1
β : Type u_2
s t : Set α
e : α
⊢ {e}.encard = 1
state_after: α : Type u_1
β : Type u_2
s t : Set α
e : α
⊢ 1 = PartENat.withTopEquiv.symm 1

tactic: rfl
state_before: α : Type u_1
β : Type u_2
s t : Set α
e : α
⊢ 1 = PartENat.withTopEquiv.symm 1
state_after: no goals
Theorem: continuous_algebraMap
File: Mathlib/Topology/Algebra/Algebra.lean

tactic: rw [algebraMap_eq_smul_one']
state_before: R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : ContinuousSMul R A
⊢ Continuous ⇑(algebraMap R A)
state_after: R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : ContinuousSMul R A
⊢ Continuous fun r => r • 1

tactic: exact continuous_id.smul continuous_const
state_before: R : Type u_1
A : Type u
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSpace A
inst✝ : ContinuousSMul R A
⊢ Continuous fun r => r • 1
state_after: no goals
Theorem: Ideal.leadingCoeffNth_mono
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: intro r hr
state_before: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
⊢ I.leadingCoeffNth m ≤ I.leadingCoeffNth n
state_after: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
r : R
hr : r ∈ I.leadingCoeffNth m
⊢ r ∈ I.leadingCoeffNth n

tactic: simp only [SetLike.mem_coe, mem_leadingCoeffNth] at hr ⊢
state_before: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
r : R
hr : r ∈ I.leadingCoeffNth m
⊢ r ∈ I.leadingCoeffNth n
state_after: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
r : R
hr : ∃ p ∈ I, p.degree ≤ ↑m ∧ p.leadingCoeff = r
⊢ ∃ p ∈ I, p.degree ≤ ↑n ∧ p.leadingCoeff = r

tactic: rcases hr with ⟨p, hpI, hpdeg, rfl⟩
state_before: R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
r : R
hr : ∃ p ∈ I, p.degree ≤ ↑m ∧ p.leadingCoeff = r
⊢ ∃ p ∈ I, p.degree ≤ ↑n ∧ p.leadingCoeff = r
state_after: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ ∃ p_1 ∈ I, p_1.degree ≤ ↑n ∧ p_1.leadingCoeff = p.leadingCoeff

tactic: refine ⟨p * X ^ (n - m), I.mul_mem_right _ hpI, ?_, leadingCoeff_mul_X_pow⟩
state_before: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ ∃ p_1 ∈ I, p_1.degree ≤ ↑n ∧ p_1.leadingCoeff = p.leadingCoeff
state_after: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ (p * X ^ (n - m)).degree ≤ ↑n

tactic: refine le_trans (degree_mul_le _ _) ?_
state_before: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ (p * X ^ (n - m)).degree ≤ ↑n
state_after: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ p.degree + (X ^ (n - m)).degree ≤ ↑n

tactic: refine le_trans (add_le_add hpdeg (degree_X_pow_le _)) ?_
state_before: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ p.degree + (X ^ (n - m)).degree ≤ ↑n
state_after: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ ↑m + ↑(n - m) ≤ ↑n

tactic: rw [← Nat.cast_add, add_tsub_cancel_of_le H]
state_before: case intro.intro.intro
R : Type u
S : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Semiring S
I : Ideal R[X]
m n : ℕ
H : m ≤ n
p : R[X]
hpI : p ∈ I
hpdeg : p.degree ≤ ↑m
⊢ ↑m + ↑(n - m) ≤ ↑n
state_after: no goals
Theorem: Polynomial.map_aeval_eq_aeval_map
File: Mathlib/Algebra/Polynomial/AlgebraMap.lean

tactic: conv_rhs => rw [aeval_def, ← eval_map]
state_before: R : Type u
S✝ : Type v
T✝ : Type w
A : Type z
A' : Type u_1
B : Type u_2
a✝ b : R
n : ℕ
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : Semiring A
inst✝⁹ : CommSemiring A'
inst✝⁸ : Semiring B
inst✝⁷ : Algebra R A
inst✝⁶ : Algebra R A'
inst✝⁵ : Algebra R B
p✝ q : R[X]
x : A
S : Type u_3
T : Type u_4
U : Type u_5
inst✝⁴ : CommSemiring S
inst✝³ : CommSemiring T
inst✝² : Semiring U
inst✝¹ : Algebra R S
inst✝ : Algebra T U
φ : R →+* T
ψ : S →+* U
h : (algebraMap T U).comp φ = ψ.comp (algebraMap R S)
p : R[X]
a : S
⊢ ψ ((aeval a) p) = (aeval (ψ a)) (map φ p)
state_after: R : Type u
S✝ : Type v
T✝ : Type w
A : Type z
A' : Type u_1
B : Type u_2
a✝ b : R
n : ℕ
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : Semiring A
inst✝⁹ : CommSemiring A'
inst✝⁸ : Semiring B
inst✝⁷ : Algebra R A
inst✝⁶ : Algebra R A'
inst✝⁵ : Algebra R B
p✝ q : R[X]
x : A
S : Type u_3
T : Type u_4
U : Type u_5
inst✝⁴ : CommSemiring S
inst✝³ : CommSemiring T
inst✝² : Semiring U
inst✝¹ : Algebra R S
inst✝ : Algebra T U
φ : R →+* T
ψ : S →+* U
h : (algebraMap T U).comp φ = ψ.comp (algebraMap R S)
p : R[X]
a : S
⊢ ψ ((aeval a) p) = eval (ψ a) (map (algebraMap T U) (map φ p))

tactic: rw [map_map, h, ← map_map, eval_map, eval₂_at_apply, aeval_def, eval_map]
state_before: R : Type u
S✝ : Type v
T✝ : Type w
A : Type z
A' : Type u_1
B : Type u_2
a✝ b : R
n : ℕ
inst✝¹¹ : CommSemiring R
inst✝¹⁰ : Semiring A
inst✝⁹ : CommSemiring A'
inst✝⁸ : Semiring B
inst✝⁷ : Algebra R A
inst✝⁶ : Algebra R A'
inst✝⁵ : Algebra R B
p✝ q : R[X]
x : A
S : Type u_3
T : Type u_4
U : Type u_5
inst✝⁴ : CommSemiring S
inst✝³ : CommSemiring T
inst✝² : Semiring U
inst✝¹ : Algebra R S
inst✝ : Algebra T U
φ : R →+* T
ψ : S →+* U
h : (algebraMap T U).comp φ = ψ.comp (algebraMap R S)
p : R[X]
a : S
⊢ ψ ((aeval a) p) = eval (ψ a) (map (algebraMap T U) (map φ p))
state_after: no goals