tasksource/leandojo huggingface dataset:
Theorem: left_div_gcd_ne_zero
File: Mathlib/RingTheory/EuclideanDomain.lean

tactic: obtain ⟨r, hr⟩ := GCDMonoid.gcd_dvd_left p q
state_before: R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p q : R
hp : p ≠ 0
⊢ p / GCDMonoid.gcd p q ≠ 0

tactic: obtain ⟨pq0, r0⟩ : GCDMonoid.gcd p q ≠ 0 ∧ r ≠ 0 := mul_ne_zero_iff.mp (hr ▸ hp)
state_before: case intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
⊢ p / GCDMonoid.gcd p q ≠ 0

tactic: nth_rw 1 [hr]
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ p / GCDMonoid.gcd p q ≠ 0

tactic: rw [mul_comm, EuclideanDomain.mul_div_cancel _ pq0]
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ GCDMonoid.gcd p q * r / GCDMonoid.gcd p q ≠ 0

tactic: exact r0
state_before: case intro.intro
R : Type u_1
inst✝¹ : EuclideanDomain R
inst✝ : GCDMonoid R
p q : R
hp : p ≠ 0
r : R
hr : p = GCDMonoid.gcd p q * r
pq0 : GCDMonoid.gcd p q ≠ 0
r0 : r ≠ 0
⊢ r ≠ 0
Theorem: Set.dual_ordConnectedSection
File: Mathlib/Data/Set/Intervals/OrdConnectedComponent.lean

tactic: simp_rw [ordConnectedSection, ordConnectedProj]
state_before: α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x y z : α
s : Set α
⊢ ordConnectedSection (↑ofDual ⁻¹' s) = ↑ofDual ⁻¹' ordConnectedSection s

tactic: ext x
state_before: α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x y z : α
s : Set α
⊢ (range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent (↑ofDual ⁻¹' s) ↑x))) =
    ↑ofDual ⁻¹' range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑x))

tactic: simp [dual_ordConnectedComponent]
state_before: case h
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x✝ y z : α
s : Set α
x : αᵒᵈ
⊢ (x ∈ range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent (↑ofDual ⁻¹' s) ↑x))) ↔
    x ∈ ↑ofDual ⁻¹' range fun x => Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑x))

tactic: tauto
state_before: case h
α : Type u_1
inst✝ : LinearOrder α
s✝ t : Set α
x✝ y z : α
s : Set α
x : αᵒᵈ
⊢ (∃ a h, Nonempty.some (_ : Set.Nonempty (↑ofDual ⁻¹' ordConnectedComponent s a)) = x) ↔
    ∃ a h, Nonempty.some (_ : Set.Nonempty (ordConnectedComponent s ↑{ val := a, property := (_ : a ∈ s) })) = ↑ofDual x
Theorem: NNReal.young_inequality_real
File: Mathlib/Analysis/MeanInequalities.lean

tactic: nth_rw 1 [← Real.coe_toNNReal p hpq.nonneg]
state_before: ι : Type u
s : Finset ι
a b : ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
⊢ a * b ≤ a ^ p / Real.toNNReal p + b ^ q / Real.toNNReal q

tactic: nth_rw 1 [← Real.coe_toNNReal q hpq.symm.nonneg]
state_before: ι : Type u
s : Finset ι
a b : ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
⊢ a * b ≤ a ^ ↑(Real.toNNReal p) / Real.toNNReal p + b ^ q / Real.toNNReal q

tactic: exact young_inequality a b hpq.one_lt_nnreal hpq.inv_add_inv_conj_nnreal
state_before: ι : Type u
s : Finset ι
a b : ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
⊢ a * b ≤ a ^ ↑(Real.toNNReal p) / Real.toNNReal p + b ^ ↑(Real.toNNReal q) / Real.toNNReal q
Theorem: Finsupp.filter_zero
File: Mathlib/Data/Finsupp/Basic.lean

tactic: classical rw [← support_eq_empty, support_filter, support_zero, Finset.filter_empty]
state_before: α : Type u_1
β : Type ?u.474229
γ : Type ?u.474232
ι : Type ?u.474235
M : Type u_2
M' : Type ?u.474241
N : Type ?u.474244
P : Type ?u.474247
G : Type ?u.474250
H : Type ?u.474253
R : Type ?u.474256
S : Type ?u.474259
inst✝ : Zero M
p : α → Prop
f : α →₀ M
⊢ filter p 0 = 0

tactic: rw [← support_eq_empty, support_filter, support_zero, Finset.filter_empty]
state_before: α : Type u_1
β : Type ?u.474229
γ : Type ?u.474232
ι : Type ?u.474235
M : Type u_2
M' : Type ?u.474241
N : Type ?u.474244
P : Type ?u.474247
G : Type ?u.474250
H : Type ?u.474253
R : Type ?u.474256
S : Type ?u.474259
inst✝ : Zero M
p : α → Prop
f : α →₀ M
⊢ filter p 0 = 0
Theorem: CategoryTheory.Limits.WidePushout.eq_desc_of_comp_eq
File: Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean

tactic: intro h1 h2
state_before: J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g : widePushout B (fun j => objs j) arrows ⟶ X
⊢ (∀ (j : J), ι arrows j ≫ g = fs j) → head arrows ≫ g = f → g = desc f fs w

tactic: apply
  (colimit.isColimit (WidePushoutShape.wideSpan B objs arrows)).uniq
    (WidePushoutShape.mkCocone f fs <| w)
state_before: J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g = fs j
h2 : head arrows ≫ g = f
⊢ g = desc f fs w

tactic: rintro (_ | _)
state_before: case x
J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g = fs j
h2 : head arrows ≫ g = f
⊢ ∀ (j : WidePushoutShape J),
    (colimit.cocone (WidePushoutShape.wideSpan B objs arrows)).ι.app j ≫ g = (WidePushoutShape.mkCocone f fs w).ι.app j

tactic: apply h2
state_before: case x.none
J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g = fs j
h2 : head arrows ≫ g = f
⊢ (colimit.cocone (WidePushoutShape.wideSpan B objs arrows)).ι.app none ≫ g =
    (WidePushoutShape.mkCocone f fs w).ι.app none

tactic: apply h1
state_before: case x.some
J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → B ⟶ objs j
inst✝ : HasWidePushout B objs arrows
X : D
f : B ⟶ X
fs : (j : J) → objs j ⟶ X
w : ∀ (j : J), arrows j ≫ fs j = f
g : widePushout B (fun j => objs j) arrows ⟶ X
h1 : ∀ (j : J), ι arrows j ≫ g = fs j
h2 : head arrows ≫ g = f
val✝ : J
⊢ (colimit.cocone (WidePushoutShape.wideSpan B objs arrows)).ι.app (some val✝) ≫ g =
    (WidePushoutShape.mkCocone f fs w).ι.app (some val✝)
Theorem: CategoryTheory.Limits.limitObjIsoLimitCompEvaluation_inv_π_app
File: Mathlib/CategoryTheory/Limits/FunctorCategory.lean

tactic: dsimp [limitObjIsoLimitCompEvaluation]
state_before: C : Type u
inst✝⁴ : Category C
D : Type u'
inst✝³ : Category D
J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
inst✝ : HasLimitsOfShape J C
F : J ⥤ K ⥤ C
j : J
k : K
⊢ (limitObjIsoLimitCompEvaluation F k).inv ≫ (limit.π F j).app k = limit.π (F ⋙ (evaluation K C).obj k) j

tactic: rw [Iso.inv_comp_eq]
state_before: C : Type u
inst✝⁴ : Category C
D : Type u'
inst✝³ : Category D
J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
inst✝ : HasLimitsOfShape J C
F : J ⥤ K ⥤ C
j : J
k : K
⊢ (preservesLimitIso ((evaluation K C).obj k) F).inv ≫ (limit.π F j).app k = limit.π (F ⋙ (evaluation K C).obj k) j

tactic: simp
state_before: C : Type u
inst✝⁴ : Category C
D : Type u'
inst✝³ : Category D
J : Type u₁
inst✝² : Category J
K : Type u₂
inst✝¹ : Category K
inst✝ : HasLimitsOfShape J C
F : J ⥤ K ⥤ C
j : J
k : K
⊢ (limit.π F j).app k = (preservesLimitIso ((evaluation K C).obj k) F).hom ≫ limit.π (F ⋙ (evaluation K C).obj k) j
Theorem: Pi.continuous_uncurry
File: Mathlib/Control/LawfulFix.lean

tactic: ext ⟨x, y⟩
state_before: α : Type u_1
β : α → Type u_2
γ : (a : α) → β a → Type u_3
inst✝ : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)
c : Chain ((a : α) → (b : β a) → γ a b)
⊢ ↑(monotoneUncurry α β γ) (ωSup c) = ωSup (Chain.map c (monotoneUncurry α β γ))

tactic: dsimp [uncurry, ωSup]
state_before: case h.mk
α : Type u_1
β : α → Type u_2
γ : (a : α) → β a → Type u_3
inst✝ : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)
c : Chain ((a : α) → (b : β a) → γ a b)
x : α
y : β x
⊢ ↑(monotoneUncurry α β γ) (ωSup c) { fst := x, snd := y } =
    ωSup (Chain.map c (monotoneUncurry α β γ)) { fst := x, snd := y }

tactic: rw [map_comp, map_comp]
state_before: case h.mk
α : Type u_1
β : α → Type u_2
γ : (a : α) → β a → Type u_3
inst✝ : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)
c : Chain ((a : α) → (b : β a) → γ a b)
x : α
y : β x
⊢ ωSup (Chain.map (Chain.map c (evalOrderHom x)) (evalOrderHom y)) =
    ωSup (Chain.map (Chain.map c (monotoneUncurry α β γ)) (evalOrderHom { fst := x, snd := y }))

tactic: rfl
state_before: case h.mk
α : Type u_1
β : α → Type u_2
γ : (a : α) → β a → Type u_3
inst✝ : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)
c : Chain ((a : α) → (b : β a) → γ a b)
x : α
y : β x
⊢ ωSup (Chain.map c (OrderHom.comp (evalOrderHom y) (evalOrderHom x))) =
    ωSup (Chain.map c (OrderHom.comp (evalOrderHom { fst := x, snd := y }) (monotoneUncurry α β γ)))
Theorem: RatFunc.intDegree_X
File: Mathlib/FieldTheory/RatFunc.lean

tactic: rw [intDegree, RatFunc.num_X, Polynomial.natDegree_X, RatFunc.denom_X, Polynomial.natDegree_one,
  Int.ofNat_one, Int.ofNat_zero, sub_zero]
state_before: K : Type u
inst✝ : Field K
⊢ intDegree X = 1
Theorem: Filter.mem_iInf_of_iInter
File: Mathlib/Order/Filter/Basic.lean

tactic: haveI := I_fin.fintype
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.68937
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_1
s : ι → Filter α
U : Set α
I : Set ι
I_fin : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
hU : (⋂ (i : ↑I), V i) ⊆ U
⊢ U ∈ ⨅ (i : ι), s i

tactic: refine' mem_of_superset (iInter_mem.2 fun i => _) hU
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.68937
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_1
s : ι → Filter α
U : Set α
I : Set ι
I_fin : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
hU : (⋂ (i : ↑I), V i) ⊆ U
this : Fintype ↑I
⊢ U ∈ ⨅ (i : ι), s i

tactic: exact mem_iInf_of_mem (i : ι) (hV _)
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.68937
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_1
s : ι → Filter α
U : Set α
I : Set ι
I_fin : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
hU : (⋂ (i : ↑I), V i) ⊆ U
this : Fintype ↑I
i : ↑I
⊢ V i ∈ ⨅ (i : ι), s i
Theorem: HasDerivWithinAt.smul
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: simpa using (HasFDerivWithinAt.smul hc hf).hasDerivWithinAt
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 L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
c : 𝕜 → 𝕜'
c' : 𝕜'
hc : HasDerivWithinAt c c' s x
hf : HasDerivWithinAt f f' s x
⊢ HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) s x
Theorem: AlgHom.toLinearMap_ofLinearMap
File: Mathlib/Algebra/Algebra/Hom.lean

tactic: ext
state_before: R : Type u
A : Type v
B : Type w
C : Type u₁
D : Type v₁
inst✝⁸ : CommSemiring R
inst✝⁷ : Semiring A
inst✝⁶ : Semiring B
inst✝⁵ : Semiring C
inst✝⁴ : Semiring D
inst✝³ : Algebra R A
inst✝² : Algebra R B
inst✝¹ : Algebra R C
inst✝ : Algebra R D
φ : A →ₐ[R] B
f : A →ₗ[R] B
map_one : ↑f 1 = 1
map_mul : ∀ (x y : A), ↑f (x * y) = ↑f x * ↑f y
⊢ toLinearMap (ofLinearMap f map_one map_mul) = f

tactic: rfl
state_before: case h
R : Type u
A : Type v
B : Type w
C : Type u₁
D : Type v₁
inst✝⁸ : CommSemiring R
inst✝⁷ : Semiring A
inst✝⁶ : Semiring B
inst✝⁵ : Semiring C
inst✝⁴ : Semiring D
inst✝³ : Algebra R A
inst✝² : Algebra R B
inst✝¹ : Algebra R C
inst✝ : Algebra R D
φ : A →ₐ[R] B
f : A →ₗ[R] B
map_one : ↑f 1 = 1
map_mul : ∀ (x y : A), ↑f (x * y) = ↑f x * ↑f y
x✝ : A
⊢ ↑(toLinearMap (ofLinearMap f map_one map_mul)) x✝ = ↑f x✝
Theorem: rank_submodule_le
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: rw [← rank_top R M]
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.89139
R : Type u
inst✝⁶ : Ring R
M : Type v
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M' : Type v'
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
M₁ : Type v
inst✝¹ : AddCommGroup M₁
inst✝ : Module R M₁
s : Submodule R M
⊢ Module.rank R { x // x ∈ s } ≤ Module.rank R M

tactic: exact rank_le_of_submodule _ _ le_top
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.89139
R : Type u
inst✝⁶ : Ring R
M : Type v
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M' : Type v'
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
M₁ : Type v
inst✝¹ : AddCommGroup M₁
inst✝ : Module R M₁
s : Submodule R M
⊢ Module.rank R { x // x ∈ s } ≤ Module.rank R { x // x ∈ ⊤ }
Theorem: exists_rat_lt
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: rwa [Rat.cast_coe_int]
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : Archimedean α
x✝ y ε x : α
n : ℤ
h : ↑n < x
⊢ ↑↑n < x
Theorem: AdjoinRoot.Minpoly.toAdjoin.apply_X
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: simp [toAdjoin]
state_before: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ ↑(toAdjoin R x) (↑(mk (minpoly R x)) X) = { val := x, property := (_ : x ∈ adjoin R {x}) }
Theorem: Mathlib.Meta.NormNum.minFacHelper_3
File: Mathlib/Tactic/NormNum/Prime.lean

tactic: refine minFacHelper_1 e h λ h2 ↦ ?_
state_before: n k k' : ℕ
e : k + 2 = k'
nk : beq (n % k) 0 = false
h : MinFacHelper n k
⊢ MinFacHelper n k'

tactic: have nk := Nat.ne_of_beq_eq_false nk
state_before: n k k' : ℕ
e : k + 2 = k'
nk : beq (n % k) 0 = false
h : MinFacHelper n k
h2 : minFac n = k
⊢ False

tactic: rw [← Nat.dvd_iff_mod_eq_zero, ← h2] at nk
state_before: n k k' : ℕ
e : k + 2 = k'
nk✝ : beq (n % k) 0 = false
h : MinFacHelper n k
h2 : minFac n = k
nk : ¬n % k = 0
⊢ False

tactic: exact nk <| minFac_dvd n
state_before: n k k' : ℕ
e : k + 2 = k'
nk✝ : beq (n % k) 0 = false
h : MinFacHelper n k
h2 : minFac n = k
nk : ¬minFac n ∣ n
⊢ False
Theorem: Tuple.monotone_sort
File: Mathlib/Data/Fin/Tuple/Sort.lean

tactic: rw [self_comp_sort]
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ Monotone (f ∘ ↑(sort f))

tactic: exact (monotone_proj f).comp (graphEquiv₂ f).monotone
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
⊢ Monotone (graph.proj ∘ ↑(graphEquiv₂ f))
Theorem: ack_strict_mono_left'
File: Mathlib/Computability/Ackermann.lean

tactic: simpa using one_lt_ack_succ_right m 0
state_before: m : ℕ
_h : 0 < m + 1
⊢ ack 0 0 < ack (m + 1) 0

tactic: rw [ack_zero, ack_succ_succ]
state_before: m n : ℕ
h : 0 < m + 1
⊢ ack 0 (n + 1) < ack (m + 1) (n + 1)

tactic: apply lt_of_le_of_lt (le_trans _ <| add_le_add_left (add_add_one_le_ack _ _) m) (add_lt_ack _ _)
state_before: m n : ℕ
h : 0 < m + 1
⊢ n + 1 + 1 < ack m (ack (m + 1) n)

tactic: linarith
state_before: m n : ℕ
h : 0 < m + 1
⊢ n + 1 + 1 ≤ m + (m + 1 + n + 1)

tactic: simpa using ack_strict_mono_left' 1 ((add_lt_add_iff_right 1).1 h)
state_before: m₁ m₂ : ℕ
h : m₁ + 1 < m₂ + 1
⊢ ack (m₁ + 1) 0 < ack (m₂ + 1) 0

tactic: rw [ack_succ_succ, ack_succ_succ]
state_before: m₁ m₂ n : ℕ
h : m₁ + 1 < m₂ + 1
⊢ ack (m₁ + 1) (n + 1) < ack (m₂ + 1) (n + 1)

tactic: exact
  (ack_strict_mono_left' _ <| (add_lt_add_iff_right 1).1 h).trans
    (ack_strictMono_right _ <| ack_strict_mono_left' n h)
state_before: m₁ m₂ n : ℕ
h : m₁ + 1 < m₂ + 1
⊢ ack m₁ (ack (m₁ + 1) n) < ack m₂ (ack (m₂ + 1) n)
Theorem: PythagoreanTriple.classified
File: Mathlib/NumberTheory/PythagoreanTriples.lean

tactic: by_cases h0 : Int.gcd x y = 0
state_before: x y z : ℤ
h : PythagoreanTriple x y z
⊢ IsClassified h

tactic: apply h.isClassified_of_normalize_isPrimitiveClassified
state_before: case neg
x y z : ℤ
h : PythagoreanTriple x y z
h0 : ¬Int.gcd x y = 0
⊢ IsClassified h

tactic: apply h.normalize.isPrimitiveClassified_of_coprime
state_before: case neg
x y z : ℤ
h : PythagoreanTriple x y z
h0 : ¬Int.gcd x y = 0
⊢ IsPrimitiveClassified (_ : PythagoreanTriple (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) (z / ↑(Int.gcd x y)))

tactic: apply Int.gcd_div_gcd_div_gcd (Nat.pos_of_ne_zero h0)
state_before: case neg
x y z : ℤ
h : PythagoreanTriple x y z
h0 : ¬Int.gcd x y = 0
⊢ Int.gcd (x / ↑(Int.gcd x y)) (y / ↑(Int.gcd x y)) = 1

tactic: have hx : x = 0 := by
  apply Int.natAbs_eq_zero.mp
  apply Nat.eq_zero_of_gcd_eq_zero_left h0
state_before: case pos
x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
⊢ IsClassified h

tactic: have hy : y = 0 := by
  apply Int.natAbs_eq_zero.mp
  apply Nat.eq_zero_of_gcd_eq_zero_right h0
state_before: case pos
x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
hx : x = 0
⊢ IsClassified h

tactic: use 0, 1, 0
state_before: case pos
x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
hx : x = 0
hy : y = 0
⊢ IsClassified h

tactic: field_simp [hx, hy]
state_before: case pos
x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
hx : x = 0
hy : y = 0
⊢ (x = 0 * (1 ^ 2 - 0 ^ 2) ∧ y = 0 * (2 * 1 * 0) ∨ x = 0 * (2 * 1 * 0) ∧ y = 0 * (1 ^ 2 - 0 ^ 2)) ∧ Int.gcd 1 0 = 1

tactic: apply Int.natAbs_eq_zero.mp
state_before: x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
⊢ x = 0

tactic: apply Nat.eq_zero_of_gcd_eq_zero_left h0
state_before: x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
⊢ Int.natAbs x = 0

tactic: apply Int.natAbs_eq_zero.mp
state_before: x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
hx : x = 0
⊢ y = 0

tactic: apply Nat.eq_zero_of_gcd_eq_zero_right h0
state_before: x y z : ℤ
h : PythagoreanTriple x y z
h0 : Int.gcd x y = 0
hx : x = 0
⊢ Int.natAbs y = 0
Theorem: ExceptCpsT.runCatch_lift
File: src/lean/Init/Control/ExceptCps.lean

tactic: simp [runCatch, lift]
state_before: m : Type u → Type u_1
α : Type u
inst✝¹ : Monad m
inst✝ : LawfulMonad m
x : m α
⊢ runCatch (lift x) = x
Theorem: Associates.le_of_count_ne_zero
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: nontriviality α
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
m p : Associates α
h0 : m ≠ 0
hp : Irreducible p
⊢ count p (factors m) ≠ 0 → p ≤ m

tactic: rw [← pos_iff_ne_zero]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
m p : Associates α
h0 : m ≠ 0
hp : Irreducible p
✝ : Nontrivial α
⊢ count p (factors m) ≠ 0 → p ≤ m

tactic: intro h
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
m p : Associates α
h0 : m ≠ 0
hp : Irreducible p
✝ : Nontrivial α
⊢ 0 < count p (factors m) → p ≤ m

tactic: rw [← pow_one p]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
m p : Associates α
h0 : m ≠ 0
hp : Irreducible p
✝ : Nontrivial α
h : 0 < count p (factors m)
⊢ p ≤ m

tactic: apply (prime_pow_dvd_iff_le h0 hp).2
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
m p : Associates α
h0 : m ≠ 0
hp : Irreducible p
✝ : Nontrivial α
h : 0 < count p (factors m)
⊢ p ^ 1 ≤ m

tactic: simpa only
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
m p : Associates α
h0 : m ≠ 0
hp : Irreducible p
✝ : Nontrivial α
h : 0 < count p (factors m)
⊢ 1 ≤ count p (factors m)
Theorem: LocalHomeomorph.extend_target
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: simp_rw [extend, LocalEquiv.trans_target, I.target_eq, I.toLocalEquiv_coe_symm, inter_comm]
state_before: 𝕜 : Type u_3
E : Type u_1
M : Type u_2
H : Type u_4
E' : Type ?u.130206
M' : Type ?u.130209
H' : Type ?u.130212
inst✝⁸ : NontriviallyNormedField 𝕜
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
f f' : LocalHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝³ : NormedAddCommGroup E'
inst✝² : NormedSpace 𝕜 E'
inst✝¹ : TopologicalSpace H'
inst✝ : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
x : M
s t : Set M
⊢ (extend f I).target = ↑(ModelWithCorners.symm I) ⁻¹' f.target ∩ range ↑I
Theorem: List.drop_append
File: Mathlib/Data/List/Basic.lean

tactic: rw [drop_append_eq_append_drop, drop_eq_nil_of_le] <;> simp
state_before: ι : Type ?u.207245
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
i : ℕ
⊢ drop (length l₁ + i) (l₁ ++ l₂) = drop i l₂
Theorem: Associates.prod_mono
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: have : b = ⊤ := top_unique h
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
b : FactorSet α
h : none ≤ b
⊢ FactorSet.prod none ≤ FactorSet.prod b

tactic: rw [this, prod_top]
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
b : FactorSet α
h : none ≤ b
this : b = ⊤
⊢ FactorSet.prod none ≤ FactorSet.prod b

tactic: exact le_rfl
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
b : FactorSet α
h : none ≤ b
this : b = ⊤
⊢ FactorSet.prod none ≤ 0

tactic: simp
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
a : FactorSet α
x✝ : a ≤ none
⊢ FactorSet.prod a ≤ FactorSet.prod ⊤

tactic: exact le_top
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
a : FactorSet α
x✝ : a ≤ none
⊢ FactorSet.prod a ≤ 0
Theorem: Ordnode.Sized.balance'
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: unfold balance'
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : Sized l
hr : Sized r
⊢ Sized (Ordnode.balance' l x r)

tactic: split_ifs
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : Sized l
hr : Sized r
⊢ Sized
    (if size l + size r ≤ 1 then Ordnode.node' l x r
    else
      if size r > delta * size l then Ordnode.rotateL l x r
      else if size l > delta * size r then Ordnode.rotateR l x r else Ordnode.node' l x r)

tactic: exact hl.node' hr
state_before: case inl
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : Sized l
hr : Sized r
h✝ : size l + size r ≤ 1
⊢ Sized (Ordnode.node' l x r)

tactic: exact hl.rotateL hr
state_before: case inr.inl
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : Sized l
hr : Sized r
h✝¹ : ¬size l + size r ≤ 1
h✝ : size r > delta * size l
⊢ Sized (Ordnode.rotateL l x r)

tactic: exact hl.rotateR hr
state_before: case inr.inr.inl
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : Sized l
hr : Sized r
h✝² : ¬size l + size r ≤ 1
h✝¹ : ¬size r > delta * size l
h✝ : size l > delta * size r
⊢ Sized (Ordnode.rotateR l x r)

tactic: exact hl.node' hr
state_before: case inr.inr.inr
α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
hl : Sized l
hr : Sized r
h✝² : ¬size l + size r ≤ 1
h✝¹ : ¬size r > delta * size l
h✝ : ¬size l > delta * size r
⊢ Sized (Ordnode.node' l x r)