1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: NNRat.cast_pos
File: Mathlib/Data/Rat/Cast/Order.lean

tactic: norm_cast
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedSemifield K
p q : ℚ≥0
⊢ 0 < ↑q ↔ 0 < q
state_after: no goals
Theorem: mul_self_sub_one
File: Mathlib/Algebra/Ring/Commute.lean

tactic: rw [← (Commute.one_right a).mul_self_sub_mul_self_eq, mul_one]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : NonAssocRing R
a : R
⊢ a * a - 1 = (a + 1) * (a - 1)
state_after: no goals
Theorem: WithBot.coe_lt_coe
File: Mathlib/Order/WithBot.lean

tactic: simp [LT.lt]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a b : α
inst✝ : LT α
⊢ ↑a < ↑b ↔ a < b
state_after: no goals
Theorem: AList.ext
File: Mathlib/Data/List/AList.lean

tactic: congr
state_before: α : Type u
β : α → Type v
l₁ : List (Sigma β)
h₁ : l₁.NodupKeys
l₂ : List (Sigma β)
nodupKeys✝ : l₂.NodupKeys
H : { entries := l₁, nodupKeys := h₁ }.entries = { entries := l₂, nodupKeys := nodupKeys✝ }.entries
⊢ { entries := l₁, nodupKeys := h₁ } = { entries := l₂, nodupKeys := nodupKeys✝ }
state_after: no goals
Theorem: DilationEquiv.coe_pow
File: Mathlib/Topology/MetricSpace/DilationEquiv.lean

tactic: rw [← coe_toEquiv, ← toPerm_apply, map_pow, Equiv.Perm.coe_pow]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ X
n : ℕ
⊢ ⇑(e ^ n) = (⇑e)^[n]
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ X
n : ℕ
⊢ (⇑(toPerm e))^[n] = (⇑e)^[n]

tactic: rfl
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
e : X ≃ᵈ X
n : ℕ
⊢ (⇑(toPerm e))^[n] = (⇑e)^[n]
state_after: no goals
Theorem: SetLike.lt_iff_le_and_exists
File: Mathlib/Data/SetLike/Basic.lean

tactic: rw [lt_iff_le_not_le, not_le_iff_exists]
state_before: A : Type u_1
B : Type u_2
i : SetLike A B
p q : A
⊢ p < q ↔ p ≤ q ∧ ∃ x ∈ q, x ∉ p
state_after: no goals
Theorem: Matrix.invOf_eq
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: letI := invertibleOfDetInvertible A
state_before: l : Type u_1
m : Type u
n : Type u'
α : Type v
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : CommRing α
A B : Matrix n n α
inst✝¹ : Invertible A.det
inst✝ : Invertible A
⊢ ⅟A = ⅟A.det • A.adjugate
state_after: l : Type u_1
m : Type u
n : Type u'
α : Type v
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : CommRing α
A B : Matrix n n α
inst✝¹ : Invertible A.det
inst✝ : Invertible A
this : Invertible A := A.invertibleOfDetInvertible
⊢ ⅟A = ⅟A.det • A.adjugate

tactic: convert (rfl : ⅟ A = _)
state_before: l : Type u_1
m : Type u
n : Type u'
α : Type v
inst✝⁴ : Fintype n
inst✝³ : DecidableEq n
inst✝² : CommRing α
A B : Matrix n n α
inst✝¹ : Invertible A.det
inst✝ : Invertible A
this : Invertible A := A.invertibleOfDetInvertible
⊢ ⅟A = ⅟A.det • A.adjugate
state_after: no goals
Theorem: toIcoDiv_sub
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [one_zsmul] using toIcoDiv_sub_zsmul hp a b 1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp a (b - p) = toIcoDiv hp a b - 1
state_after: no goals
Theorem: EuclideanGeometry.left_dist_ne_zero_of_angle_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Affine.lean

tactic: by_contra heq
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : ∠ p1 p2 p3 = π
⊢ dist p1 p2 ≠ 0
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : ∠ p1 p2 p3 = π
heq : dist p1 p2 = 0
⊢ False

tactic: rw [dist_eq_zero] at heq
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : ∠ p1 p2 p3 = π
heq : dist p1 p2 = 0
⊢ False
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : ∠ p1 p2 p3 = π
heq : p1 = p2
⊢ False

tactic: rw [heq, angle_self_left] at h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : ∠ p1 p2 p3 = π
heq : p1 = p2
⊢ False
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : π / 2 = π
heq : p1 = p2
⊢ False

tactic: exact Real.pi_ne_zero (by linarith)
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : π / 2 = π
heq : p1 = p2
⊢ False
state_after: no goals

tactic: linarith
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
p p₀ p₁ p₂ p1 p2 p3 : P
h : π / 2 = π
heq : p1 = p2
⊢ π = 0
state_after: no goals
Theorem: inv_neg'
File: Mathlib/Algebra/Ring/Basic.lean

tactic: rw [eq_comm, eq_inv_iff_mul_eq_one, neg_mul, mul_neg, neg_neg, mul_left_inv]
state_before: R : Type u_1
α : Type u_2
inst✝¹ : Group α
inst✝ : HasDistribNeg α
a : α
⊢ (-a)⁻¹ = -a⁻¹
state_after: no goals
Theorem: Cycle.chain_ne_nil
File: Mathlib/Data/List/Cycle.lean

tactic: intro m a _H _
state_before: α : Type u_1
r : α → α → Prop
l : List α
⊢ ∀ (l : List α) (a : α),
    (∀ (hl : l ≠ []), Chain r ↑l ↔ List.Chain r (l.getLast hl) l) →
      ∀ (hl : l ++ [a] ≠ []), Chain r ↑(l ++ [a]) ↔ List.Chain r ((l ++ [a]).getLast hl) (l ++ [a])
state_after: α : Type u_1
r : α → α → Prop
l m : List α
a : α
_H : ∀ (hl : m ≠ []), Chain r ↑m ↔ List.Chain r (m.getLast hl) m
hl✝ : m ++ [a] ≠ []
⊢ Chain r ↑(m ++ [a]) ↔ List.Chain r ((m ++ [a]).getLast hl✝) (m ++ [a])

tactic: rw [← coe_cons_eq_coe_append, chain_coe_cons, getLast_append_singleton]
state_before: α : Type u_1
r : α → α → Prop
l m : List α
a : α
_H : ∀ (hl : m ≠ []), Chain r ↑m ↔ List.Chain r (m.getLast hl) m
hl✝ : m ++ [a] ≠ []
⊢ Chain r ↑(m ++ [a]) ↔ List.Chain r ((m ++ [a]).getLast hl✝) (m ++ [a])
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.le_smul_caratheodory
File: Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean

tactic: simp only [smul_apply, smul_eq_mul]
state_before: α : Type u_1
a : ℝ≥0∞
m : OuterMeasure α
s : Set α
h : MeasurableSet s
t : Set α
⊢ (a • m) t = (a • m) (t ∩ s) + (a • m) (t \ s)
state_after: α : Type u_1
a : ℝ≥0∞
m : OuterMeasure α
s : Set α
h : MeasurableSet s
t : Set α
⊢ a * m t = a * m (t ∩ s) + a * m (t \ s)

tactic: rw [(isCaratheodory_iff m).mp h t]
state_before: α : Type u_1
a : ℝ≥0∞
m : OuterMeasure α
s : Set α
h : MeasurableSet s
t : Set α
⊢ a * m t = a * m (t ∩ s) + a * m (t \ s)
state_after: α : Type u_1
a : ℝ≥0∞
m : OuterMeasure α
s : Set α
h : MeasurableSet s
t : Set α
⊢ a * (m (t ∩ s) + m (t \ s)) = a * m (t ∩ s) + a * m (t \ s)

tactic: simp [mul_add]
state_before: α : Type u_1
a : ℝ≥0∞
m : OuterMeasure α
s : Set α
h : MeasurableSet s
t : Set α
⊢ a * (m (t ∩ s) + m (t \ s)) = a * m (t ∩ s) + a * m (t \ s)
state_after: no goals
Theorem: CategoryTheory.Limits.cospanExt_hom_app_one
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: dsimp [cospanExt]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y Z X' Y' Z' : C
iX : X ≅ X'
iY : Y ≅ Y'
iZ : Z ≅ Z'
f : X ⟶ Z
g : Y ⟶ Z
f' : X' ⟶ Z'
g' : Y' ⟶ Z'
wf : iX.hom ≫ f' = f ≫ iZ.hom
wg : iY.hom ≫ g' = g ≫ iZ.hom
⊢ (cospanExt iX iY iZ wf wg).hom.app WalkingCospan.one = iZ.hom
state_after: no goals
Theorem: Algebra.TensorProduct.one_mul
File: Mathlib/RingTheory/TensorProduct/Basic.lean

tactic: refine TensorProduct.induction_on x ?_ ?_ ?_ <;> simp (config := { contextual := true })
state_before: R : Type uR
S : Type uS
A : Type uA
B : Type uB
C : Type uC
D : Type uD
E : Type uE
F : Type uF
inst✝⁸ : CommSemiring R
inst✝⁷ : NonAssocSemiring A
inst✝⁶ : Module R A
inst✝⁵ : SMulCommClass R A A
inst✝⁴ : IsScalarTower R A A
inst✝³ : NonAssocSemiring B
inst✝² : Module R B
inst✝¹ : SMulCommClass R B B
inst✝ : IsScalarTower R B B
x : A ⊗[R] B
⊢ (mul (1 ⊗ₜ[R] 1)) x = x
state_after: no goals
Theorem: Finset.map_symm_subset
File: Mathlib/Data/Finset/Image.lean

tactic: simp only [← subset_map_symm, Equiv.symm_symm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f✝ : α ↪ β
s : Finset α
t : Finset β
f : α ≃ β
⊢ map f.symm.toEmbedding t ⊆ s ↔ t ⊆ map f.toEmbedding s
state_after: no goals
Theorem: CategoryTheory.isSubterminal_of_isIso_diag
File: Mathlib/CategoryTheory/Subterminal.lean

tactic: have : (Limits.prod.fst : A ⨯ A ⟶ _) = Limits.prod.snd := by simp [← cancel_epi (diag A)]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
A : C
inst✝¹ : HasBinaryProduct A A
inst✝ : IsIso (diag A)
Z : C
f g : Z ⟶ A
⊢ f = g
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
A : C
inst✝¹ : HasBinaryProduct A A
inst✝ : IsIso (diag A)
Z : C
f g : Z ⟶ A
this : prod.fst = prod.snd
⊢ f = g

tactic: rw [← prod.lift_fst f g, this, prod.lift_snd]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
A : C
inst✝¹ : HasBinaryProduct A A
inst✝ : IsIso (diag A)
Z : C
f g : Z ⟶ A
this : prod.fst = prod.snd
⊢ f = g
state_after: no goals

tactic: simp [← cancel_epi (diag A)]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
A : C
inst✝¹ : HasBinaryProduct A A
inst✝ : IsIso (diag A)
Z : C
f g : Z ⟶ A
⊢ prod.fst = prod.snd
state_after: no goals
Theorem: lt_mul_inv_iff_lt
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_lt_mul_iff_right b, one_mul, inv_mul_cancel_right]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : α
⊢ 1 < a * b⁻¹ ↔ b < a
state_after: no goals
Theorem: Real.lt_logb_iff_rpow_lt_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [← rpow_lt_rpow_left_iff_of_base_lt_one b_pos b_lt_one, rpow_logb b_pos (b_ne_one b_lt_one) hy]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hy : 0 < y
⊢ x < logb b y ↔ y < b ^ x
state_after: no goals
Theorem: PMF.bind_bind
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: simpa only [ENNReal.coe_inj.symm, bind_apply, ENNReal.tsum_mul_left.symm,
  ENNReal.tsum_mul_right.symm, mul_assoc, mul_left_comm, mul_comm] using ENNReal.tsum_comm
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f : α → PMF β
g : β → PMF γ
b : γ
⊢ ((p.bind f).bind g) b = (p.bind fun a => (f a).bind g) b
state_after: no goals
Theorem: CategoryTheory.Limits.Trident.ofCone_π
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

tactic: cases j <;> aesop_cat
state_before: J : Type w
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f : J → (X ⟶ Y)
F : WalkingParallelFamily J ⥤ C
t : Cone F
j : WalkingParallelFamily J
⊢ F.obj j = (parallelFamily fun j => F.map (line j)).obj j
state_after: no goals
Theorem: mem_minimals_iff
File: Mathlib/Order/Minimal.lean

tactic: haveI := IsAntisymm.swap r
state_before: α : Type u_1
β : Type u_2
r r₁ r₂ : α → α → Prop
s t : Set α
a b x : α
inst✝ : IsAntisymm α r
⊢ x ∈ minimals r s ↔ x ∈ s ∧ ∀ ⦃y : α⦄, y ∈ s → r y x → x = y
state_after: α : Type u_1
β : Type u_2
r r₁ r₂ : α → α → Prop
s t : Set α
a b x : α
inst✝ : IsAntisymm α r
this : IsAntisymm α (swap r)
⊢ x ∈ minimals r s ↔ x ∈ s ∧ ∀ ⦃y : α⦄, y ∈ s → r y x → x = y

tactic: exact mem_maximals_iff
state_before: α : Type u_1
β : Type u_2
r r₁ r₂ : α → α → Prop
s t : Set α
a b x : α
inst✝ : IsAntisymm α r
this : IsAntisymm α (swap r)
⊢ x ∈ minimals r s ↔ x ∈ s ∧ ∀ ⦃y : α⦄, y ∈ s → r y x → x = y
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_comm
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: rw [restrict_restrict hs, restrict_restrict' hs, inter_comm]
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 α
hs : MeasurableSet s
⊢ (μ.restrict t).restrict s = (μ.restrict s).restrict t
state_after: no goals
Theorem: Set.iUnion₂_subset_iff
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [iUnion_subset_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : (i : ι) → κ i → Set α
t : Set α
⊢ ⋃ i, ⋃ j, s i j ⊆ t ↔ ∀ (i : ι) (j : κ i), s i j ⊆ t
state_after: no goals
Theorem: mdifferentiable_iff_differentiable
File: Mathlib/Geometry/Manifold/MFDeriv/FDeriv.lean

tactic: simp only [MDifferentiable, Differentiable, mdifferentiableAt_iff_differentiableAt]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
E' : Type u_3
inst✝¹ : NormedAddCommGroup E'
inst✝ : NormedSpace 𝕜 E'
f : E → E'
s : Set E
x : E
⊢ MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f ↔ Differentiable 𝕜 f
state_after: no goals
Theorem: Polynomial.isUnit_aeval_of_isUnit_aeval_of_isNilpotent_sub
File: Mathlib/RingTheory/Polynomial/Nilpotent.lean

tactic: rw [← add_sub_cancel (aeval b P) (aeval a P)]
state_before: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsUnit ((aeval a) P)
state_after: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsUnit ((aeval b) P + ((aeval a) P - (aeval b) P))

tactic: refine IsNilpotent.isUnit_add_left_of_commute ?_ hb (Commute.all _ _)
state_before: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsUnit ((aeval b) P + ((aeval a) P - (aeval b) P))
state_after: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsNilpotent ((aeval a) P - (aeval b) P)

tactic: exact isNilpotent_aeval_sub_of_isNilpotent_sub P hab
state_before: R✝ : Type u_1
r : R✝
R : Type u_2
S : Type u_3
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
a b : S
hb : IsUnit ((aeval b) P)
hab : IsNilpotent (a - b)
⊢ IsNilpotent ((aeval a) P - (aeval b) P)
state_after: no goals
Theorem: Nat.floorRoot_eq_zero
File: Mathlib/Data/Nat/Factorization/Root.lean

tactic: simp only [not_and_or, ne_eq, not_not]
state_before: a b n : ℕ
⊢ ¬(n ≠ 0 ∧ a ≠ 0) ↔ n = 0 ∨ a = 0
state_after: no goals
Theorem: Polynomial.Monic.irreducible_iff_natDegree
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: by_cases hp1 : p = 1
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0
state_after: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : p = 1
⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0

case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : ¬p = 1
⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0

tactic: rw [irreducible_of_monic hp hp1, and_iff_right hp1]
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : ¬p = 1
⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0
state_after: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : ¬p = 1
⊢ (∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1) ↔
    ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0

tactic: refine forall₄_congr fun a b ha hb => ?_
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : ¬p = 1
⊢ (∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f = 1 ∨ g = 1) ↔
    ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0
state_after: case neg
R : Type u
S : Type v
T : Type w
a✝ b✝ : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : ¬p = 1
a b : R[X]
ha : a.Monic
hb : b.Monic
⊢ a * b = p → a = 1 ∨ b = 1 ↔ a * b = p → a.natDegree = 0 ∨ b.natDegree = 0

tactic: rw [ha.natDegree_eq_zero_iff_eq_one, hb.natDegree_eq_zero_iff_eq_one]
state_before: case neg
R : Type u
S : Type v
T : Type w
a✝ b✝ : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : ¬p = 1
a b : R[X]
ha : a.Monic
hb : b.Monic
⊢ a * b = p → a = 1 ∨ b = 1 ↔ a * b = p → a.natDegree = 0 ∨ b.natDegree = 0
state_after: no goals

tactic: simp [hp1]
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommSemiring R
inst✝ : NoZeroDivisors R
p q : R[X]
hp : p.Monic
hp1 : p = 1
⊢ Irreducible p ↔ p ≠ 1 ∧ ∀ (f g : R[X]), f.Monic → g.Monic → f * g = p → f.natDegree = 0 ∨ g.natDegree = 0
state_after: no goals
Theorem: Orientation.linearIsometryEquiv_comp_rightAngleRotation
File: Mathlib/Analysis/InnerProductSpace/TwoDim.lean

tactic: convert (o.rightAngleRotation_map φ (φ x)).symm
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ φ (o.rightAngleRotation x) = o.rightAngleRotation (φ x)
state_after: case h.e'_2.h.e'_6.h.e'_6
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ x = φ.symm (φ x)

case h.e'_3.h.e'_5.h.e'_5
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ o = (map (Fin 2) φ.toLinearEquiv) o

tactic: simp
state_before: case h.e'_2.h.e'_6.h.e'_6
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ x = φ.symm (φ x)
state_after: no goals

tactic: symm
state_before: case h.e'_3.h.e'_5.h.e'_5
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ o = (map (Fin 2) φ.toLinearEquiv) o
state_after: case h.e'_3.h.e'_5.h.e'_5
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ (map (Fin 2) φ.toLinearEquiv) o = o

tactic: rwa [← o.map_eq_iff_det_pos φ.toLinearEquiv] at hφ
state_before: case h.e'_3.h.e'_5.h.e'_5
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ (map (Fin 2) φ.toLinearEquiv) o = o
state_after: case h.e'_3.h.e'_5.h.e'_5
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ Fintype.card (Fin 2) = finrank ℝ E

tactic: rw [@Fact.out (finrank ℝ E = 2), Fintype.card_fin]
state_before: case h.e'_3.h.e'_5.h.e'_5
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : InnerProductSpace ℝ E
inst✝ : Fact (finrank ℝ E = 2)
o : Orientation ℝ E (Fin 2)
φ : E ≃ₗᵢ[ℝ] E
hφ : 0 < LinearMap.det ↑φ.toLinearEquiv
x : E
⊢ Fintype.card (Fin 2) = finrank ℝ E
state_after: no goals
Theorem: Mathlib.Meta.NormNum.JacobiSym.mod_left
File: Mathlib/Tactic/NormNum/LegendreSymbol.lean

tactic: rw [← hr, jacobiSymNat, jacobiSym.mod_left, hb', hab, ← h]
state_before: a : ℤ
b ab' : ℕ
ab r b' : ℤ
hb' : ↑b = b'
hab : a % b' = ab
h : ↑ab' = ab
hr : jacobiSymNat ab' b = r
⊢ jacobiSym a b = r
state_after: no goals
Theorem: Real.sqrt_mul'
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [mul_comm, sqrt_mul hy, mul_comm]
state_before: x✝ y✝ x y : ℝ
hy : 0 ≤ y
⊢ √(x * y) = √x * √y
state_after: no goals
Theorem: Submodule.smul_le_self_of_tower
File: Mathlib/Algebra/Module/Submodule/Pointwise.lean

tactic: rintro y ⟨x, hx, rfl⟩
state_before: α✝ : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁰ : Semiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : Module R M
inst✝⁷ : Monoid α✝
inst✝⁶ : DistribMulAction α✝ M
inst✝⁵ : SMulCommClass α✝ R M
α : Type u_4
inst✝⁴ : Semiring α
inst✝³ : Module α R
inst✝² : Module α M
inst✝¹ : SMulCommClass α R M
inst✝ : IsScalarTower α R M
a : α
S : Submodule R M
⊢ a • S ≤ S
state_after: case intro.intro
α✝ : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁰ : Semiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : Module R M
inst✝⁷ : Monoid α✝
inst✝⁶ : DistribMulAction α✝ M
inst✝⁵ : SMulCommClass α✝ R M
α : Type u_4
inst✝⁴ : Semiring α
inst✝³ : Module α R
inst✝² : Module α M
inst✝¹ : SMulCommClass α R M
inst✝ : IsScalarTower α R M
a : α
S : Submodule R M
x : M
hx : x ∈ ↑S
⊢ (DistribMulAction.toLinearMap R M a) x ∈ S

tactic: exact smul_of_tower_mem _ a hx
state_before: case intro.intro
α✝ : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁰ : Semiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : Module R M
inst✝⁷ : Monoid α✝
inst✝⁶ : DistribMulAction α✝ M
inst✝⁵ : SMulCommClass α✝ R M
α : Type u_4
inst✝⁴ : Semiring α
inst✝³ : Module α R
inst✝² : Module α M
inst✝¹ : SMulCommClass α R M
inst✝ : IsScalarTower α R M
a : α
S : Submodule R M
x : M
hx : x ∈ ↑S
⊢ (DistribMulAction.toLinearMap R M a) x ∈ S
state_after: no goals
Theorem: NONote.cmp_compares
File: Mathlib/SetTheory/Ordinal/Notation.lean

tactic: dsimp [cmp]
state_before: a : ONote
ha : a.NF
b : ONote
hb : b.NF
⊢ (cmp ⟨a, ha⟩ ⟨b, hb⟩).Compares ⟨a, ha⟩ ⟨b, hb⟩
state_after: a : ONote
ha : a.NF
b : ONote
hb : b.NF
⊢ (a.cmp b).Compares ⟨a, ha⟩ ⟨b, hb⟩

tactic: have := ONote.cmp_compares a b
state_before: a : ONote
ha : a.NF
b : ONote
hb : b.NF
⊢ (a.cmp b).Compares ⟨a, ha⟩ ⟨b, hb⟩
state_after: a : ONote
ha : a.NF
b : ONote
hb : b.NF
this : (a.cmp b).Compares a b
⊢ (a.cmp b).Compares ⟨a, ha⟩ ⟨b, hb⟩

tactic: cases h : ONote.cmp a b <;> simp only [h] at this <;> try exact this
state_before: a : ONote
ha : a.NF
b : ONote
hb : b.NF
this : (a.cmp b).Compares a b
⊢ (a.cmp b).Compares ⟨a, ha⟩ ⟨b, hb⟩
state_after: case eq
a : ONote
ha : a.NF
b : ONote
hb : b.NF
h : a.cmp b = Ordering.eq
this : Ordering.eq.Compares a b
⊢ Ordering.eq.Compares ⟨a, ha⟩ ⟨b, hb⟩

tactic: exact Subtype.mk_eq_mk.2 this
state_before: case eq
a : ONote
ha : a.NF
b : ONote
hb : b.NF
h : a.cmp b = Ordering.eq
this : Ordering.eq.Compares a b
⊢ Ordering.eq.Compares ⟨a, ha⟩ ⟨b, hb⟩
state_after: no goals

tactic: exact this
state_before: case gt
a : ONote
ha : a.NF
b : ONote
hb : b.NF
h : a.cmp b = Ordering.gt
this : Ordering.gt.Compares a b
⊢ Ordering.gt.Compares ⟨a, ha⟩ ⟨b, hb⟩
state_after: no goals
Theorem: Substring.Valid.foldl
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp [h.foldl, h.toString]
state_before: α : Type u_1
f : α → Char → α
init : α
x✝ : Substring
h✝ : x✝.Valid
w✝² w✝¹ w✝ : List Char
h : ValidFor w✝² w✝¹ w✝ x✝
⊢ Substring.foldl f init x✝ = List.foldl f init x✝.toString.data
state_after: no goals