1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Zsqrtd.lift_injective
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: have h_inj : Function.Injective ((↑) : ℤ → R) := Int.cast_injective
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
⊢ a = 0
state_after: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
⊢ a = 0

tactic: suffices lift r a.norm = 0 by
  simp only [intCast_re, add_zero, lift_apply_apply, intCast_im, Int.cast_zero,
    zero_mul] at this
  rwa [← Int.cast_zero, h_inj.eq_iff, norm_eq_zero hd] at this
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
⊢ a = 0
state_after: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
⊢ (lift r) ↑a.norm = 0

tactic: rw [norm_eq_mul_conj, RingHom.map_mul, ha, zero_mul]
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
⊢ (lift r) ↑a.norm = 0
state_after: no goals

tactic: simp only [intCast_re, add_zero, lift_apply_apply, intCast_im, Int.cast_zero,
  zero_mul] at this
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
this : (lift r) ↑a.norm = 0
⊢ a = 0
state_after: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
this : ↑a.norm = 0
⊢ a = 0

tactic: rwa [← Int.cast_zero, h_inj.eq_iff, norm_eq_zero hd] at this
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : (lift r) a = 0
h_inj : Function.Injective Int.cast
this : ↑a.norm = 0
⊢ a = 0
state_after: no goals
Theorem: abs_sub_le_iff
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: rw [abs_le, neg_le_sub_iff_le_add, sub_le_iff_le_add', and_comm, sub_le_iff_le_add']
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ |a - b| ≤ c ↔ a - b ≤ c ∧ b - a ≤ c
state_after: no goals
Theorem: Polynomial.sub_dvd_eval_sub
File: Mathlib/Algebra/Polynomial/Div.lean

tactic: suffices X - C b ∣ p - C (p.eval b) by
  simpa only [coe_evalRingHom, eval_sub, eval_X, eval_C] using (evalRingHom a).map_dvd this
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b✝ : R
n : ℕ
inst✝ : CommRing R
p✝ q : R[X]
a b : R
p : R[X]
⊢ a - b ∣ eval a p - eval b p
state_after: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b✝ : R
n : ℕ
inst✝ : CommRing R
p✝ q : R[X]
a b : R
p : R[X]
⊢ X - C b ∣ p - C (eval b p)

tactic: simp [dvd_iff_isRoot]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b✝ : R
n : ℕ
inst✝ : CommRing R
p✝ q : R[X]
a b : R
p : R[X]
⊢ X - C b ∣ p - C (eval b p)
state_after: no goals

tactic: simpa only [coe_evalRingHom, eval_sub, eval_X, eval_C] using (evalRingHom a).map_dvd this
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b✝ : R
n : ℕ
inst✝ : CommRing R
p✝ q : R[X]
a b : R
p : R[X]
this : X - C b ∣ p - C (eval b p)
⊢ a - b ∣ eval a p - eval b p
state_after: no goals
Theorem: tendsto_ratCast_atBot_iff
File: Mathlib/Order/Filter/Archimedean.lean

tactic: rw [← @Rat.comap_cast_atBot R, tendsto_comap_iff]
state_before: α : Type u_1
R : Type u_2
inst✝¹ : LinearOrderedField R
inst✝ : Archimedean R
f : α → ℚ
l : Filter α
⊢ Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto f l atBot
state_after: α : Type u_1
R : Type u_2
inst✝¹ : LinearOrderedField R
inst✝ : Archimedean R
f : α → ℚ
l : Filter α
⊢ Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto (Rat.cast ∘ f) l atBot

tactic: rfl
state_before: α : Type u_1
R : Type u_2
inst✝¹ : LinearOrderedField R
inst✝ : Archimedean R
f : α → ℚ
l : Filter α
⊢ Tendsto (fun n => ↑(f n)) l atBot ↔ Tendsto (Rat.cast ∘ f) l atBot
state_after: no goals
Theorem: ENNReal.strictMono_rpow_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: intro x y hxy
state_before: z : ℝ
h : 0 < z
⊢ StrictMono fun x => x ^ z
state_after: z : ℝ
h : 0 < z
x y : ℝ≥0∞
hxy : x < y
⊢ (fun x => x ^ z) x < (fun x => x ^ z) y

tactic: lift x to ℝ≥0 using ne_top_of_lt hxy
state_before: z : ℝ
h : 0 < z
x y : ℝ≥0∞
hxy : x < y
⊢ (fun x => x ^ z) x < (fun x => x ^ z) y
state_after: case intro
z : ℝ
h : 0 < z
y : ℝ≥0∞
x : ℝ≥0
hxy : ↑x < y
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) y

tactic: rcases eq_or_ne y ∞ with (rfl | hy)
state_before: case intro
z : ℝ
h : 0 < z
y : ℝ≥0∞
x : ℝ≥0
hxy : ↑x < y
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) y
state_after: case intro.inl
z : ℝ
h : 0 < z
x : ℝ≥0
hxy : ↑x < ⊤
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) ⊤

case intro.inr
z : ℝ
h : 0 < z
y : ℝ≥0∞
x : ℝ≥0
hxy : ↑x < y
hy : y ≠ ⊤
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) y

tactic: simp only [top_rpow_of_pos h, coe_rpow_of_nonneg _ h.le, coe_lt_top]
state_before: case intro.inl
z : ℝ
h : 0 < z
x : ℝ≥0
hxy : ↑x < ⊤
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) ⊤
state_after: no goals

tactic: lift y to ℝ≥0 using hy
state_before: case intro.inr
z : ℝ
h : 0 < z
y : ℝ≥0∞
x : ℝ≥0
hxy : ↑x < y
hy : y ≠ ⊤
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) y
state_after: case intro.inr.intro
z : ℝ
h : 0 < z
x y : ℝ≥0
hxy : ↑x < ↑y
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) ↑y

tactic: simp only [coe_rpow_of_nonneg _ h.le, NNReal.rpow_lt_rpow (coe_lt_coe.1 hxy) h, coe_lt_coe]
state_before: case intro.inr.intro
z : ℝ
h : 0 < z
x y : ℝ≥0
hxy : ↑x < ↑y
⊢ (fun x => x ^ z) ↑x < (fun x => x ^ z) ↑y
state_after: no goals
Theorem: quadraticCharFun_eq_one_of_char_two
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean

tactic: simp only [quadraticCharFun, ha, if_false, ite_eq_left_iff]
state_before: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F = 2
a : F
ha : a ≠ 0
⊢ quadraticCharFun F a = 1
state_after: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F = 2
a : F
ha : a ≠ 0
⊢ ¬IsSquare a → False

tactic: exact fun h ↦ (h (FiniteField.isSquare_of_char_two hF a)).elim
state_before: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
hF : ringChar F = 2
a : F
ha : a ≠ 0
⊢ ¬IsSquare a → False
state_after: no goals
Theorem: Pi.mulSupport_mulSingle_of_ne
File: Mathlib/Algebra/Group/Support.lean

tactic: rwa [mem_mulSupport, hx, mulSingle_eq_same]
state_before: A : Type u_1
B : Type u_2
inst✝¹ : DecidableEq A
inst✝ : One B
a : A
b : B
h : b ≠ 1
x : A
hx : x = a
⊢ x ∈ mulSupport (mulSingle a b)
state_after: no goals
Theorem: ArithmeticFunction.natCoe_mul
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: ext n
state_before: R : Type u_1
inst✝ : Semiring R
f g : ArithmeticFunction ℕ
⊢ ↑(f * g) = ↑f * ↑g
state_after: case h
R : Type u_1
inst✝ : Semiring R
f g : ArithmeticFunction ℕ
n : ℕ
⊢ ↑(f * g) n = (↑f * ↑g) n

tactic: simp
state_before: case h
R : Type u_1
inst✝ : Semiring R
f g : ArithmeticFunction ℕ
n : ℕ
⊢ ↑(f * g) n = (↑f * ↑g) n
state_after: no goals
Theorem: Cardinal.cast_toNat_of_aleph0_le
File: Mathlib/SetTheory/Cardinal/ToNat.lean

tactic: rw [toNat_apply_of_aleph0_le h, Nat.cast_zero]
state_before: α : Type u
c✝ d : Cardinal.{u}
c : Cardinal.{u_1}
h : ℵ₀ ≤ c
⊢ ↑(toNat c) = 0
state_after: no goals
Theorem: IsTrichotomous.swap
File: Mathlib/Order/RelClasses.lean

tactic: simpa [Function.swap, or_comm, or_left_comm] using trichotomous_of r a b
state_before: α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝ : IsTrichotomous α r
a b : α
⊢ Function.swap r a b ∨ a = b ∨ Function.swap r b a
state_after: no goals
Theorem: WeierstrassCurve.leadingCoeff_Ψ₃
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: rw [leadingCoeff, W.natDegree_Ψ₃ h, coeff_Ψ₃]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
h : 3 ≠ 0
⊢ W.Ψ₃.leadingCoeff = 3
state_after: no goals
Theorem: Set.insert_diff_of_mem
File: Mathlib/Data/Set/Basic.lean

tactic: ext
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
h : a ∈ t
⊢ insert a s \ t = s \ t
state_after: case h
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
h : a ∈ t
x✝ : α
⊢ x✝ ∈ insert a s \ t ↔ x✝ ∈ s \ t

tactic: constructor <;> simp (config := { contextual := true }) [or_imp, h]
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
h : a ∈ t
x✝ : α
⊢ x✝ ∈ insert a s \ t ↔ x✝ ∈ s \ t
state_after: no goals
Theorem: Int.natAbs_le_iff_mul_self_le
File: Mathlib/Data/Int/Order/Lemmas.lean

tactic: rw [← abs_le_iff_mul_self_le, abs_eq_natAbs, abs_eq_natAbs]
state_before: a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ a.natAbs ≤ b.natAbs ↔ a * a ≤ b * b
state_after: a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ a.natAbs ≤ b.natAbs ↔ ↑a.natAbs ≤ ↑b.natAbs

tactic: exact Int.ofNat_le.symm
state_before: a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ a.natAbs ≤ b.natAbs ↔ ↑a.natAbs ≤ ↑b.natAbs
state_after: no goals
Theorem: SetTheory.PGame.numeric_toPGame
File: Mathlib/SetTheory/Surreal/Basic.lean

tactic: induction' o using Ordinal.induction with o IH
state_before: o : Ordinal.{u_1}
⊢ o.toPGame.Numeric
state_after: case h
o : Ordinal.{u_1}
IH : ∀ k < o, k.toPGame.Numeric
⊢ o.toPGame.Numeric

tactic: apply numeric_of_isEmpty_rightMoves
state_before: case h
o : Ordinal.{u_1}
IH : ∀ k < o, k.toPGame.Numeric
⊢ o.toPGame.Numeric
state_after: case h.H
o : Ordinal.{u_1}
IH : ∀ k < o, k.toPGame.Numeric
⊢ ∀ (i : o.toPGame.LeftMoves), (o.toPGame.moveLeft i).Numeric

tactic: simpa using fun i => IH _ (Ordinal.toLeftMovesToPGame_symm_lt i)
state_before: case h.H
o : Ordinal.{u_1}
IH : ∀ k < o, k.toPGame.Numeric
⊢ ∀ (i : o.toPGame.LeftMoves), (o.toPGame.moveLeft i).Numeric
state_after: no goals
Theorem: CochainComplex.HomComplex.Cochain.shift_units_smul
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.lean

tactic: ext p q hpq
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a : ℤ
x : Rˣ
⊢ (x • γ).shift a = x • γ.shift a
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a : ℤ
x : Rˣ
p q : ℤ
hpq : p + n = q
⊢ ((x • γ).shift a).v p q hpq = (x • γ.shift a).v p q hpq

tactic: simp [shift_v']
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a : ℤ
x : Rˣ
p q : ℤ
hpq : p + n = q
⊢ ((x • γ).shift a).v p q hpq = (x • γ.shift a).v p q hpq
state_after: no goals
Theorem: Int.ModEq.pow_card_sub_one_eq_one
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: haveI : Fact p.Prime := ⟨hp⟩
state_before: K : Type u_1
R : Type u_2
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
⊢ n ^ (p - 1) ≡ 1 [ZMOD ↑p]
state_after: K : Type u_1
R : Type u_2
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this : Fact (Nat.Prime p)
⊢ n ^ (p - 1) ≡ 1 [ZMOD ↑p]

tactic: simpa [← ZMod.intCast_eq_intCast_iff] using ZMod.pow_card_sub_one_eq_one this
state_before: K : Type u_1
R : Type u_2
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this✝ : Fact (Nat.Prime p)
this : ¬↑n = 0
⊢ n ^ (p - 1) ≡ 1 [ZMOD ↑p]
state_after: no goals

tactic: rw [CharP.intCast_eq_zero_iff _ p, ← (Nat.prime_iff_prime_int.mp hp).coprime_iff_not_dvd]
state_before: K : Type u_1
R : Type u_2
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this : Fact (Nat.Prime p)
⊢ ¬↑n = 0
state_after: K : Type u_1
R : Type u_2
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this : Fact (Nat.Prime p)
⊢ IsCoprime (↑p) n

tactic: exact hpn.symm
state_before: K : Type u_1
R : Type u_2
p : ℕ
hp : Nat.Prime p
n : ℤ
hpn : IsCoprime n ↑p
this : Fact (Nat.Prime p)
⊢ IsCoprime (↑p) n
state_after: no goals
Theorem: IsGδ.biInter_of_isOpen
File: Mathlib/Topology/GDelta.lean

tactic: rwa [forall_mem_image]
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
I : Set ι
hI : I.Countable
f : ι → Set X
hf : ∀ i ∈ I, IsOpen (f i)
⊢ ∀ t ∈ f '' I, IsOpen t
state_after: no goals

tactic: rw [sInter_image]
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
I : Set ι
hI : I.Countable
f : ι → Set X
hf : ∀ i ∈ I, IsOpen (f i)
⊢ ⋂ i ∈ I, f i = ⋂₀ (f '' I)
state_after: no goals
Theorem: nmem_nonZeroDivisorsRight_iff
File: Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean

tactic: simpa [mem_nonZeroDivisorsRight_iff] using Set.nonempty_def.symm
state_before: M₀ : Type u_1
inst✝ : MonoidWithZero M₀
r : M₀
⊢ r ∉ nonZeroDivisorsRight M₀ ↔ {s | r * s = 0 ∧ s ≠ 0}.Nonempty
state_after: no goals
Theorem: Submodule.eq_iSup_inf_genEigenspace
File: Mathlib/LinearAlgebra/Eigenspace/Triangularizable.lean

tactic: rw [← inf_iSup_genEigenspace h, h', inf_top_eq]
state_before: K : Type u_1
V : Type u_2
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
p : Submodule K V
f : End K V
inst✝ : FiniteDimensional K V
h : ∀ x ∈ p, f x ∈ p
h' : ⨆ μ, ⨆ k, (f.genEigenspace μ) k = ⊤
⊢ p = ⨆ μ, ⨆ k, p ⊓ (f.genEigenspace μ) k
state_after: no goals
Theorem: Complex.AbsTheory.abs_conj
File: Mathlib/Data/Complex/Abs.lean

tactic: simp
state_before: z : ℂ
⊢ (abs(starRingEnd ℂ) z) = abs z
state_after: no goals
Theorem: finprod_mem_empty
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
⊢ ∏ᶠ (i : α) (_ : i ∈ ∅), f i = 1
state_after: no goals
Theorem: CategoryTheory.mono_iff_injective
File: Mathlib/CategoryTheory/Types.lean

tactic: constructor
state_before: X Y : Type u
f : X ⟶ Y
⊢ Mono f ↔ Function.Injective f
state_after: case mp
X Y : Type u
f : X ⟶ Y
⊢ Mono f → Function.Injective f

case mpr
X Y : Type u
f : X ⟶ Y
⊢ Function.Injective f → Mono f

tactic: intro H x x' h
state_before: case mp
X Y : Type u
f : X ⟶ Y
⊢ Mono f → Function.Injective f
state_after: case mp
X Y : Type u
f : X ⟶ Y
H : Mono f
x x' : X
h : f x = f x'
⊢ x = x'

tactic: rw [← homOfElement_eq_iff] at h ⊢
state_before: case mp
X Y : Type u
f : X ⟶ Y
H : Mono f
x x' : X
h : f x = f x'
⊢ x = x'
state_after: case mp
X Y : Type u
f : X ⟶ Y
H : Mono f
x x' : X
h : homOfElement (f x) = homOfElement (f x')
⊢ homOfElement x = homOfElement x'

tactic: exact (cancel_mono f).mp h
state_before: case mp
X Y : Type u
f : X ⟶ Y
H : Mono f
x x' : X
h : homOfElement (f x) = homOfElement (f x')
⊢ homOfElement x = homOfElement x'
state_after: no goals

tactic: exact fun H => ⟨fun g g' h => H.comp_left h⟩
state_before: case mpr
X Y : Type u
f : X ⟶ Y
⊢ Function.Injective f → Mono f
state_after: no goals
Theorem: IsIntegralClosure.mk'_algebraMap
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: rw [algebraMap_mk', ← IsScalarTower.algebraMap_apply]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra R B
inst✝³ : Algebra A B
inst✝² : IsIntegralClosure A R B
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R A B
x : R
h : optParam (IsIntegral R ((algebraMap R B) x)) ⋯
⊢ (algebraMap A B) (mk' A ((algebraMap R B) x) h) = (algebraMap A B) ((algebraMap R A) x)
state_after: no goals
Theorem: InnerProductGeometry.norm_div_cos_angle_sub_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [← neg_eq_zero, ← inner_neg_right] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y = 0
⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y = 0
⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖

tactic: rw [← neg_eq_zero] at h0
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x ≠ 0 ∨ y = 0
⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x ≠ 0 ∨ -y = 0
⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖

tactic: rw [sub_eq_add_neg, norm_div_cos_angle_add_of_inner_eq_zero h h0]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x ≠ 0 ∨ -y = 0
⊢ ‖x‖ / Real.cos (angle x (x - y)) = ‖x - y‖
state_after: no goals
Theorem: Nat.count_nth
File: Mathlib/Data/Nat/Nth.lean

tactic: induction' n with k ihk
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
n : ℕ
hn : ∀ (hf : (setOf p).Finite), n < hf.toFinset.card
⊢ count p (nth p n) = n
state_after: case zero
p : ℕ → Prop
inst✝ : DecidablePred p
hn : ∀ (hf : (setOf p).Finite), 0 < hf.toFinset.card
⊢ count p (nth p 0) = 0

case succ
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
ihk : (∀ (hf : (setOf p).Finite), k < hf.toFinset.card) → count p (nth p k) = k
hn : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
⊢ count p (nth p (k + 1)) = k + 1

tactic: exact count_nth_zero _
state_before: case zero
p : ℕ → Prop
inst✝ : DecidablePred p
hn : ∀ (hf : (setOf p).Finite), 0 < hf.toFinset.card
⊢ count p (nth p 0) = 0
state_after: no goals

tactic: rw [count_eq_card_filter_range, filter_range_nth_eq_insert hn, card_insert_of_not_mem, ←
  count_eq_card_filter_range, ihk fun hf => lt_of_succ_lt (hn hf)]
state_before: case succ
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
ihk : (∀ (hf : (setOf p).Finite), k < hf.toFinset.card) → count p (nth p k) = k
hn : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
⊢ count p (nth p (k + 1)) = k + 1
state_after: case succ
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
ihk : (∀ (hf : (setOf p).Finite), k < hf.toFinset.card) → count p (nth p k) = k
hn : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
⊢ nth p k ∉ filter p (range (nth p k))

tactic: simp
state_before: case succ
p : ℕ → Prop
inst✝ : DecidablePred p
k : ℕ
ihk : (∀ (hf : (setOf p).Finite), k < hf.toFinset.card) → count p (nth p k) = k
hn : ∀ (hf : (setOf p).Finite), k + 1 < hf.toFinset.card
⊢ nth p k ∉ filter p (range (nth p k))
state_after: no goals
Theorem: Odd.not_two_dvd_nat
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rwa [← even_iff_two_dvd, ← odd_iff_not_even]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m n : ℕ
h : Odd n
⊢ ¬2 ∣ n
state_after: no goals
Theorem: WittVector.init_add_tail
File: Mathlib/RingTheory/WittVector/InitTail.lean

tactic: simp only [init, tail, ← not_lt, select_add_select_not]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
x : 𝕎 R
n : ℕ
⊢ init n x + tail n x = x
state_after: no goals
Theorem: Metric.infDist_eq_iInf
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rw [infDist, infEdist, iInf_subtype', ENNReal.toReal_iInf]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ infDist x s = ⨅ y, dist x ↑y
state_after: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ ⨅ i, (edist x ↑i).toReal = ⨅ y, dist x ↑y

ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ ∀ (i : { y // y ∈ s }), edist x ↑i ≠ ⊤

tactic: simp only [dist_edist]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ ⨅ i, (edist x ↑i).toReal = ⨅ y, dist x ↑y
state_after: no goals

tactic: exact fun _ ↦ edist_ne_top _ _
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ ∀ (i : { y // y ∈ s }), edist x ↑i ≠ ⊤
state_after: no goals
Theorem: LinearOrderedRing.orderOf_le_two
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: cases' ne_or_eq |x| 1 with h h
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a x : G
⊢ orderOf x ≤ 2
state_after: case inl
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a x : G
h : |x| ≠ 1
⊢ orderOf x ≤ 2

case inr
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a x : G
h : |x| = 1
⊢ orderOf x ≤ 2

tactic: rcases eq_or_eq_neg_of_abs_eq h with (rfl | rfl)
state_before: case inr
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a x : G
h : |x| = 1
⊢ orderOf x ≤ 2
state_after: case inr.inl
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a : G
h : |1| = 1
⊢ orderOf 1 ≤ 2

case inr.inr
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a : G
h : |(-1)| = 1
⊢ orderOf (-1) ≤ 2

tactic: apply orderOf_le_of_pow_eq_one <;> norm_num
state_before: case inr.inr
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a : G
h : |(-1)| = 1
⊢ orderOf (-1) ≤ 2
state_after: no goals

tactic: simp [orderOf_abs_ne_one h]
state_before: case inl
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a x : G
h : |x| ≠ 1
⊢ orderOf x ≤ 2
state_after: no goals

tactic: simp
state_before: case inr.inl
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedRing G
a : G
h : |1| = 1
⊢ orderOf 1 ≤ 2
state_after: no goals
Theorem: PadicInt.nthHom_zero
File: Mathlib/NumberTheory/Padics/RingHoms.lean

tactic: simp (config := { unfoldPartialApp := true }) [nthHom]
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
⊢ nthHom f 0 = 0
state_after: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
⊢ (fun n => 0) = 0

tactic: rfl
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
⊢ (fun n => 0) = 0
state_after: no goals
Theorem: sSup_eq_iSup'
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [iSup, Subtype.range_coe]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f g : ι → α
s : Set α
⊢ sSup s = ⨆ a, ↑a
state_after: no goals
Theorem: NormedAddGroupHom.opNorm_zero_iff
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: rw [hn, zero_mul]
state_before: V : Type u_1
V₁✝ : Type u_2
V₂✝ : Type u_3
V₃ : Type u_4
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : SeminormedAddCommGroup V₁✝
inst✝³ : SeminormedAddCommGroup V₂✝
inst✝² : SeminormedAddCommGroup V₃
f✝ g : NormedAddGroupHom V₁✝ V₂✝
V₁ : Type u_5
V₂ : Type u_6
inst✝¹ : NormedAddCommGroup V₁
inst✝ : NormedAddCommGroup V₂
f : NormedAddGroupHom V₁ V₂
hn : ‖f‖ = 0
x : V₁
⊢ ‖f‖ * ‖x‖ = 0
state_after: no goals

tactic: rw [hf, opNorm_zero]
state_before: V : Type u_1
V₁✝ : Type u_2
V₂✝ : Type u_3
V₃ : Type u_4
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : SeminormedAddCommGroup V₁✝
inst✝³ : SeminormedAddCommGroup V₂✝
inst✝² : SeminormedAddCommGroup V₃
f✝ g : NormedAddGroupHom V₁✝ V₂✝
V₁ : Type u_5
V₂ : Type u_6
inst✝¹ : NormedAddCommGroup V₁
inst✝ : NormedAddCommGroup V₂
f : NormedAddGroupHom V₁ V₂
hf : f = 0
⊢ ‖f‖ = 0
state_after: no goals