1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Finset.image₂_assoc
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ✝ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ✝
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f'✝ : α → β → γ✝
g✝ g'✝ : α → β → γ✝ → δ
s s' : Finset α
t t' : Finset β
u✝ u' : Finset γ✝
a a' : α
b b' : β
c : γ✝
γ : Type u_14
u : Finset γ
f : δ → γ → ε
g : α → β → δ
f' : α → ε' → ε
g' : β → γ → ε'
h_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)
⊢ ↑(image₂ f (image₂ g s t) u) = ↑(image₂ f' s (image₂ g' t u))
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ✝ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ✝
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f'✝ : α → β → γ✝
g✝ g'✝ : α → β → γ✝ → δ
s s' : Finset α
t t' : Finset β
u✝ u' : Finset γ✝
a a' : α
b b' : β
c : γ✝
γ : Type u_14
u : Finset γ
f : δ → γ → ε
g : α → β → δ
f' : α → ε' → ε
g' : β → γ → ε'
h_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)
⊢ image2 f (image2 g ↑s ↑t) ↑u = image2 f' (↑s) (image2 g' ↑t ↑u)

tactic: exact image2_assoc h_assoc
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ✝ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ✝
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f'✝ : α → β → γ✝
g✝ g'✝ : α → β → γ✝ → δ
s s' : Finset α
t t' : Finset β
u✝ u' : Finset γ✝
a a' : α
b b' : β
c : γ✝
γ : Type u_14
u : Finset γ
f : δ → γ → ε
g : α → β → δ
f' : α → ε' → ε
g' : β → γ → ε'
h_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)
⊢ image2 f (image2 g ↑s ↑t) ↑u = image2 f' (↑s) (image2 g' ↑t ↑u)
state_after: no goals
Theorem: Cardinal.lift_down
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← lift_id #β, ← lift_umax, ← lift_umax.{u, v}, lift_mk_le.{v}]
state_before: α✝ β✝ : Type u
a : Cardinal.{u}
b : Cardinal.{max u v}
α : Type u
β : Type (max u v)
⊢ #β ≤ lift.{v, u} #α → ∃ a', lift.{v, u} a' = #β
state_after: α✝ β✝ : Type u
a : Cardinal.{u}
b : Cardinal.{max u v}
α : Type u
β : Type (max u v)
⊢ Nonempty (β ↪ α) → ∃ a', lift.{max u v, u} a' = lift.{max u v, max u v} #β

tactic: exact fun ⟨f⟩ =>
  ⟨#(Set.range f),
    Eq.symm <| lift_mk_eq.{_, _, v}.2
      ⟨Function.Embedding.equivOfSurjective (Embedding.codRestrict _ f Set.mem_range_self)
          fun ⟨a, ⟨b, e⟩⟩ => ⟨b, Subtype.eq e⟩⟩⟩
state_before: α✝ β✝ : Type u
a : Cardinal.{u}
b : Cardinal.{max u v}
α : Type u
β : Type (max u v)
⊢ Nonempty (β ↪ α) → ∃ a', lift.{max u v, u} a' = lift.{max u v, max u v} #β
state_after: no goals
Theorem: Cardinal.lsub_lt_ord_of_isRegular
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rwa [hc.cof_eq]
state_before: α : Type u_1
r : α → α → Prop
ι : Type (max u_2 u_3)
f : ι → Ordinal.{max u_2 u_3}
c : Cardinal.{max u_2 u_3}
hc : c.IsRegular
hι : #ι < c
⊢ #ι < c.ord.cof
state_after: no goals
Theorem: mul_eq_left₀
File: Mathlib/Algebra/GroupWithZero/Basic.lean

tactic: rw [Iff.comm, ← mul_right_inj' ha, mul_one]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : CancelMonoidWithZero M₀
a b c : M₀
ha : a ≠ 0
⊢ a * b = a ↔ b = 1
state_after: no goals
Theorem: PresheafOfModules.Derivation.d_one
File: Mathlib/Algebra/Category/ModuleCat/Differentials/Presheaf.lean

tactic: simpa using d.d_mul (X := X) 1 1
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S : Cᵒᵖ ⥤ CommRingCat
F : C ⥤ D
S' R : Dᵒᵖ ⥤ CommRingCat
M N : PresheafOfModules (R ⋙ forget₂ CommRingCat RingCat)
φ : S ⟶ F.op ⋙ R
φ' : S' ⟶ R
d : M.Derivation φ
X : Dᵒᵖ
⊢ d.d 1 = 0
state_after: no goals
Theorem: Nat.coprime_zero_left
File: .lake/packages/batteries/Batteries/Data/Nat/Gcd.lean

tactic: simp [Coprime]
state_before: n : Nat
⊢ Coprime 0 n ↔ n = 1
state_after: no goals
Theorem: MeasureTheory.withDensity_const
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: ext1 s hs
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
c : ℝ≥0∞
⊢ (μ.withDensity fun x => c) = c • μ
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
c : ℝ≥0∞
s : Set α
hs : MeasurableSet s
⊢ (μ.withDensity fun x => c) s = (c • μ) s

tactic: simp [withDensity_apply _ hs]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
c : ℝ≥0∞
s : Set α
hs : MeasurableSet s
⊢ (μ.withDensity fun x => c) s = (c • μ) s
state_after: no goals
Theorem: MvPolynomial.map_bind₁
File: Mathlib/Algebra/MvPolynomial/Monad.lean

tactic: rw [hom_bind₁, map_comp_C, ← eval₂Hom_map_hom]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* S
g : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (map f) ((bind₁ g) φ) = (bind₁ fun i => (map f) (g i)) ((map f) φ)
state_after: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* S
g : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (eval₂Hom C fun i => (map f) (g i)) ((map f) φ) = (bind₁ fun i => (map f) (g i)) ((map f) φ)

tactic: rfl
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* S
g : σ → MvPolynomial τ R
φ : MvPolynomial σ R
⊢ (eval₂Hom C fun i => (map f) (g i)) ((map f) φ) = (bind₁ fun i => (map f) (g i)) ((map f) φ)
state_after: no goals
Theorem: Orientation.two_zsmul_oangle_smul_smul_self
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: by_cases h : r₁ = 0 <;> simp [h]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x : V
r₁ r₂ : ℝ
⊢ 2 • o.oangle (r₁ • x) (r₂ • x) = 0
state_after: no goals
Theorem: WittVector.truncateFun_zsmul
File: Mathlib/RingTheory/WittVector/Truncated.lean

tactic: witt_truncateFun_tac
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
R : Type u_1
inst✝ : CommRing R
m : ℤ
x : 𝕎 R
⊢ truncateFun n (m • x) = m • truncateFun n x
state_after: no goals
Theorem: HasStrictFDerivAt.comp_hasStrictDerivAt_of_eq
File: Mathlib/Analysis/Calculus/Deriv/Comp.lean

tactic: rw [hy] at hl
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 𝕜
l : F → E
l' : F →L[𝕜] E
y : F
hl : HasStrictFDerivAt l l' y
hf : HasStrictDerivAt f f' x
hy : y = f x
⊢ HasStrictDerivAt (l ∘ f) (l' f') x
state_after: 𝕜 : 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 𝕜
l : F → E
l' : F →L[𝕜] E
y : F
hl : HasStrictFDerivAt l l' (f x)
hf : HasStrictDerivAt f f' x
hy : y = f x
⊢ HasStrictDerivAt (l ∘ f) (l' f') x

tactic: exact hl.comp_hasStrictDerivAt x hf
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 𝕜
l : F → E
l' : F →L[𝕜] E
y : F
hl : HasStrictFDerivAt l l' (f x)
hf : HasStrictDerivAt f f' x
hy : y = f x
⊢ HasStrictDerivAt (l ∘ f) (l' f') x
state_after: no goals
Theorem: InnerProductGeometry.norm_sub_eq_abs_sub_norm_of_angle_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [← sq_eq_sq (norm_nonneg (x - y)) (abs_nonneg (‖x‖ - ‖y‖)), norm_sub_pow_two_real,
  inner_eq_mul_norm_of_angle_eq_zero h, sq_abs (‖x‖ - ‖y‖)]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = 0
⊢ ‖x - y‖ = |‖x‖ - ‖y‖|
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = 0
⊢ ‖x‖ ^ 2 - 2 * (‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2

tactic: ring
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
h : angle x y = 0
⊢ ‖x‖ ^ 2 - 2 * (‖x‖ * ‖y‖) + ‖y‖ ^ 2 = (‖x‖ - ‖y‖) ^ 2
state_after: no goals
Theorem: Equiv.Perm.IsThreeCycle.isCycle
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: rw [← card_cycleType_eq_one, h.cycleType, card_singleton]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
h : σ.IsThreeCycle
⊢ σ.IsCycle
state_after: no goals
Theorem: Equiv.Set.union_symm_apply_left
File: Mathlib/Logic/Equiv/Set.lean

tactic: simp
state_before: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type ?u.15888
s t : Set α
inst✝ : DecidablePred fun x => x ∈ s
H : s ∩ t ⊆ ∅
a : ↑s
⊢ ↑a ∈ s ∪ t
state_after: no goals
Theorem: CategoryTheory.ChosenFiniteProducts.associator_hom_snd_snd
File: Mathlib/CategoryTheory/ChosenFiniteProducts.lean

tactic: erw [lift_snd_assoc, lift_snd]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ChosenFiniteProducts C
X Y Z : C
⊢ (α_ X Y Z).hom ≫ snd X (Y ⊗ Z) ≫ snd Y Z = snd (X ⊗ Y) Z
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ChosenFiniteProducts C
X Y Z : C
⊢ Limits.BinaryFan.snd (product (product X Y).cone.pt Z).cone = snd (X ⊗ Y) Z

tactic: rfl
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : ChosenFiniteProducts C
X Y Z : C
⊢ Limits.BinaryFan.snd (product (product X Y).cone.pt Z).cone = snd (X ⊗ Y) Z
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_singleton
File: Mathlib/MeasureTheory/Measure/Dirac.lean

tactic: ext1 s hs
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
a✝ : α
μ : Measure α
a : α
⊢ μ.restrict {a} = μ {a} • dirac a
state_after: case h
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s

tactic: by_cases ha : a ∈ s
state_before: case h
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s
state_after: case pos
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∈ s
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s

case neg
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∉ s
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s

tactic: have : s ∩ {a} = {a} := by simpa
state_before: case pos
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∈ s
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s
state_after: case pos
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∈ s
this : s ∩ {a} = {a}
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s

tactic: simp [*]
state_before: case pos
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∈ s
this : s ∩ {a} = {a}
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s
state_after: no goals

tactic: simpa
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∈ s
⊢ s ∩ {a} = {a}
state_after: no goals

tactic: have : s ∩ {a} = ∅ := inter_singleton_eq_empty.2 ha
state_before: case neg
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∉ s
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s
state_after: case neg
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∉ s
this : s ∩ {a} = ∅
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s

tactic: simp [*]
state_before: case neg
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s✝ : Set α
a✝ : α
μ : Measure α
a : α
s : Set α
hs : MeasurableSet s
ha : a ∉ s
this : s ∩ {a} = ∅
⊢ (μ.restrict {a}) s = (μ {a} • dirac a) s
state_after: no goals
Theorem: GeneralizedContinuedFraction.of_one_le_get?_part_denom
File: Mathlib/Algebra/ContinuedFractions/Computation/Approximations.lean

tactic: obtain ⟨gp_n, nth_s_eq, ⟨-⟩⟩ : ∃ gp_n, (of v).s.get? n = some gp_n ∧ gp_n.b = b :=
  exists_s_b_of_part_denom nth_part_denom_eq
state_before: K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
b : K
nth_part_denom_eq : (of v).partialDenominators.get? n = some b
⊢ 1 ≤ b
state_after: case intro.intro.refl
K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
gp_n : Pair K
nth_s_eq : (of v).s.get? n = some gp_n
nth_part_denom_eq : (of v).partialDenominators.get? n = some gp_n.b
⊢ 1 ≤ gp_n.b

tactic: obtain ⟨ifp_n, succ_nth_stream_eq, ifp_n_b_eq_gp_n_b⟩ :
    ∃ ifp, IntFractPair.stream v (n + 1) = some ifp ∧ (ifp.b : K) = gp_n.b :=
  IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_some nth_s_eq
state_before: case intro.intro.refl
K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
gp_n : Pair K
nth_s_eq : (of v).s.get? n = some gp_n
nth_part_denom_eq : (of v).partialDenominators.get? n = some gp_n.b
⊢ 1 ≤ gp_n.b
state_after: case intro.intro.refl.intro.intro
K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
gp_n : Pair K
nth_s_eq : (of v).s.get? n = some gp_n
nth_part_denom_eq : (of v).partialDenominators.get? n = some gp_n.b
ifp_n : IntFractPair K
succ_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n
ifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b
⊢ 1 ≤ gp_n.b

tactic: rw [← ifp_n_b_eq_gp_n_b]
state_before: case intro.intro.refl.intro.intro
K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
gp_n : Pair K
nth_s_eq : (of v).s.get? n = some gp_n
nth_part_denom_eq : (of v).partialDenominators.get? n = some gp_n.b
ifp_n : IntFractPair K
succ_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n
ifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b
⊢ 1 ≤ gp_n.b
state_after: case intro.intro.refl.intro.intro
K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
gp_n : Pair K
nth_s_eq : (of v).s.get? n = some gp_n
nth_part_denom_eq : (of v).partialDenominators.get? n = some gp_n.b
ifp_n : IntFractPair K
succ_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n
ifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b
⊢ 1 ≤ ↑ifp_n.b

tactic: exact mod_cast IntFractPair.one_le_succ_nth_stream_b succ_nth_stream_eq
state_before: case intro.intro.refl.intro.intro
K : Type u_1
v : K
n : ℕ
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
gp_n : Pair K
nth_s_eq : (of v).s.get? n = some gp_n
nth_part_denom_eq : (of v).partialDenominators.get? n = some gp_n.b
ifp_n : IntFractPair K
succ_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_n
ifp_n_b_eq_gp_n_b : ↑ifp_n.b = gp_n.b
⊢ 1 ≤ ↑ifp_n.b
state_after: no goals
Theorem: Cardinal.mk_embedding_eq_zero_iff_lift_lt
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [mk_eq_zero_iff, ← not_nonempty_iff, ← lift_mk_le', not_le]
state_before: α β : Type u
β' : Type v
⊢ #(α ↪ β') = 0 ↔ lift.{u, v} #β' < lift.{v, u} #α
state_after: no goals
Theorem: Finset.piecewise_same
File: Mathlib/Data/Finset/Piecewise.lean

tactic: ext i
state_before: ι : Type u_1
π : ι → Sort u_2
s : Finset ι
f g : (i : ι) → π i
inst✝ : (j : ι) → Decidable (j ∈ s)
⊢ s.piecewise f f = f
state_after: case h
ι : Type u_1
π : ι → Sort u_2
s : Finset ι
f g : (i : ι) → π i
inst✝ : (j : ι) → Decidable (j ∈ s)
i : ι
⊢ s.piecewise f f i = f i

tactic: by_cases h : i ∈ s <;> simp [h]
state_before: case h
ι : Type u_1
π : ι → Sort u_2
s : Finset ι
f g : (i : ι) → π i
inst✝ : (j : ι) → Decidable (j ∈ s)
i : ι
⊢ s.piecewise f f i = f i
state_after: no goals
Theorem: Set.Iic.coe_biInf
File: Mathlib/Order/CompleteLatticeIntervals.lean

tactic: cases isEmpty_or_nonempty ι
state_before: ι : Sort u_1
α : Type u_2
s : Set α
inst✝ : CompleteLattice α
a : α
S : Set ↑(Iic a)
f : ι → ↑(Iic a)
p : ι → Prop
⊢ ↑(⨅ i, ⨅ (_ : p i), f i) = a ⊓ ⨅ i, ⨅ (_ : p i), ↑(f i)
state_after: case inl
ι : Sort u_1
α : Type u_2
s : Set α
inst✝ : CompleteLattice α
a : α
S : Set ↑(Iic a)
f : ι → ↑(Iic a)
p : ι → Prop
h✝ : IsEmpty ι
⊢ ↑(⨅ i, ⨅ (_ : p i), f i) = a ⊓ ⨅ i, ⨅ (_ : p i), ↑(f i)

case inr
ι : Sort u_1
α : Type u_2
s : Set α
inst✝ : CompleteLattice α
a : α
S : Set ↑(Iic a)
f : ι → ↑(Iic a)
p : ι → Prop
h✝ : Nonempty ι
⊢ ↑(⨅ i, ⨅ (_ : p i), f i) = a ⊓ ⨅ i, ⨅ (_ : p i), ↑(f i)

tactic: simp
state_before: case inl
ι : Sort u_1
α : Type u_2
s : Set α
inst✝ : CompleteLattice α
a : α
S : Set ↑(Iic a)
f : ι → ↑(Iic a)
p : ι → Prop
h✝ : IsEmpty ι
⊢ ↑(⨅ i, ⨅ (_ : p i), f i) = a ⊓ ⨅ i, ⨅ (_ : p i), ↑(f i)
state_after: no goals

tactic: simp_rw [coe_iInf, ← inf_iInf, ← inf_assoc, inf_idem]
state_before: case inr
ι : Sort u_1
α : Type u_2
s : Set α
inst✝ : CompleteLattice α
a : α
S : Set ↑(Iic a)
f : ι → ↑(Iic a)
p : ι → Prop
h✝ : Nonempty ι
⊢ ↑(⨅ i, ⨅ (_ : p i), f i) = a ⊓ ⨅ i, ⨅ (_ : p i), ↑(f i)
state_after: no goals
Theorem: differentiable_add_const_iff
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simpa using h.add_const (-c)
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
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
c : F
h : Differentiable 𝕜 fun y => f y + c
⊢ Differentiable 𝕜 f
state_after: no goals
Theorem: MeasureTheory.Measure.count_singleton'
File: Mathlib/MeasureTheory/Measure/Count.lean

tactic: rw [count_apply_finite' (Set.finite_singleton a) ha, Set.Finite.toFinset]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
a : α
ha : MeasurableSet {a}
⊢ count {a} = 1
state_after: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
a : α
ha : MeasurableSet {a}
⊢ ↑{a}.toFinset.card = 1

tactic: simp [@toFinset_card _ _ (Set.finite_singleton a).fintype,
  @Fintype.card_unique _ _ (Set.finite_singleton a).fintype]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
s : Set α
a : α
ha : MeasurableSet {a}
⊢ ↑{a}.toFinset.card = 1
state_after: no goals
Theorem: CategoryTheory.Limits.Sigma.map'_id_id
File: Mathlib/CategoryTheory/Limits/Shapes/Products.lean

tactic: ext
state_before: β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝¹ : Category.{v, u} C
f : α → C
inst✝ : HasCoproduct f
⊢ (map' id fun a => 𝟙 (f a)) = 𝟙 (∐ f)
state_after: case h
β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝¹ : Category.{v, u} C
f : α → C
inst✝ : HasCoproduct f
b✝ : α
⊢ (ι f b✝ ≫ map' id fun a => 𝟙 (f a)) = ι f b✝ ≫ 𝟙 (∐ f)

tactic: simp
state_before: case h
β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝¹ : Category.{v, u} C
f : α → C
inst✝ : HasCoproduct f
b✝ : α
⊢ (ι f b✝ ≫ map' id fun a => 𝟙 (f a)) = ι f b✝ ≫ 𝟙 (∐ f)
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.boundedBy_eq
File: Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean

tactic: rw [boundedBy_eq_ofFunction m_empty, ofFunction_eq s m_mono m_subadd]
state_before: α : Type u_1
m : Set α → ℝ≥0∞
s : Set α
m_empty : m ∅ = 0
m_mono : ∀ ⦃t : Set α⦄, s ⊆ t → m s ≤ m t
m_subadd : ∀ (s : ℕ → Set α), m (⋃ i, s i) ≤ ∑' (i : ℕ), m (s i)
⊢ (boundedBy m) s = m s
state_after: no goals
Theorem: String.Iterator.ValidFor.valid
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simpa [List.reverseAux_eq] using Pos.Valid.mk l.reverse r
state_before: l r : List Char
⊢ { s := { data := l.reverseAux r }, i := { byteIdx := utf8Len l } }.Valid
state_after: no goals
Theorem: EuclideanDomain.gcd_eq_zero_iff
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: simpa [h] using gcd_dvd a b
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
h : gcd a b = 0
⊢ a = 0 ∧ b = 0
state_after: no goals

tactic: rintro ⟨rfl, rfl⟩
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
⊢ a = 0 ∧ b = 0 → gcd a b = 0
state_after: case intro
R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
⊢ gcd 0 0 = 0

tactic: exact gcd_zero_right _
state_before: case intro
R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
⊢ gcd 0 0 = 0
state_after: no goals
Theorem: CategoryTheory.Limits.IsInitial.hasInitial
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

tactic: aesop_cat
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X : C
h : IsInitial X
F : Discrete PEmpty.{1} ⥤ C
⊢ (X_1 : Discrete PEmpty.{1}) → F.obj X_1 ⟶ ((Functor.const (Discrete PEmpty.{1})).obj X).obj X_1
state_after: no goals

tactic: aesop_cat
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X : C
h : IsInitial X
F : Discrete PEmpty.{1} ⥤ C
⊢ ∀ ⦃X_1 Y : Discrete PEmpty.{1}⦄ (f : X_1 ⟶ Y),
    F.map f ≫ id (Discrete.casesOn Y fun as => ⋯.elim) =
      id (Discrete.casesOn X_1 fun as => ⋯.elim) ≫ ((Functor.const (Discrete PEmpty.{1})).obj X).map f
state_after: no goals
Theorem: CategoryTheory.μ_inv_naturalityₗ
File: Mathlib/CategoryTheory/Monoidal/End.lean

tactic: rw [← IsIso.comp_inv_eq, Category.assoc, ← IsIso.eq_inv_comp]
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m n m' : M
f : m ⟶ m'
X : C
⊢ (F.μIso m n).inv.app X ≫ (F.obj n).map ((F.map f).app X) = (F.map (f ▷ n)).app X ≫ (F.μIso m' n).inv.app X
state_after: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m n m' : M
f : m ⟶ m'
X : C
⊢ (F.obj n).map ((F.map f).app X) ≫ inv ((F.μIso m' n).inv.app X) = inv ((F.μIso m n).inv.app X) ≫ (F.map (f ▷ n)).app X

tactic: simp
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m n m' : M
f : m ⟶ m'
X : C
⊢ (F.obj n).map ((F.map f).app X) ≫ inv ((F.μIso m' n).inv.app X) = inv ((F.μIso m n).inv.app X) ≫ (F.map (f ▷ n)).app X
state_after: no goals
Theorem: ENNReal.sub_div
File: Mathlib/Data/ENNReal/Inv.lean

tactic: simp_rw [div_eq_mul_inv]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ 0
⊢ (a - b) / c = a / c - b / c
state_after: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ 0
⊢ (a - b) * c⁻¹ = a * c⁻¹ - b * c⁻¹

tactic: exact ENNReal.sub_mul (by simpa using h)
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ 0
⊢ (a - b) * c⁻¹ = a * c⁻¹ - b * c⁻¹
state_after: no goals

tactic: simpa using h
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : 0 < b → b < a → c ≠ 0
⊢ 0 < b → b < a → c⁻¹ ≠ ⊤
state_after: no goals