1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: BoundedContinuousFunction.norm_integral_le_norm
File: Mathlib/MeasureTheory/Integral/BoundedContinuousFunction.lean

tactic: convert f.norm_integral_le_mul_norm μ
state_before: X : Type u_1
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : OpensMeasurableSpace X
μ : Measure X
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SecondCountableTopology E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : NormedSpace ℝ E
inst✝ : IsProbabilityMeasure μ
f : X →ᵇ E
⊢ ‖∫ (x : X), f x ∂μ‖ ≤ ‖f‖
state_after: case h.e'_4
X : Type u_1
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : OpensMeasurableSpace X
μ : Measure X
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SecondCountableTopology E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : NormedSpace ℝ E
inst✝ : IsProbabilityMeasure μ
f : X →ᵇ E
⊢ ‖f‖ = (μ Set.univ).toReal * ‖f‖

tactic: simp only [measure_univ, ENNReal.one_toReal, one_mul]
state_before: case h.e'_4
X : Type u_1
inst✝⁸ : MeasurableSpace X
inst✝⁷ : TopologicalSpace X
inst✝⁶ : OpensMeasurableSpace X
μ : Measure X
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : SecondCountableTopology E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : NormedSpace ℝ E
inst✝ : IsProbabilityMeasure μ
f : X →ᵇ E
⊢ ‖f‖ = (μ Set.univ).toReal * ‖f‖
state_after: no goals
Theorem: RatFunc.coe_smul
File: Mathlib/RingTheory/LaurentSeries.lean

tactic: rw [RatFunc.smul_eq_C_mul, ← C_mul_eq_smul, coe_mul, coe_C]
state_before: R : Type u_1
F : Type u
inst✝ : Field F
p q : F[X]
f g : RatFunc F
r : F
⊢ ↑(r • f) = r • ↑f
state_after: no goals
Theorem: List.length_mapIdx
File: Mathlib/Data/List/Indexes.lean

tactic: induction' l with hd tl IH generalizing f
state_before: α : Type u
β : Type v
l : List α
f : ℕ → α → β
⊢ (mapIdx f l).length = l.length
state_after: case nil
α : Type u
β : Type v
f : ℕ → α → β
⊢ (mapIdx f []).length = [].length

case cons
α : Type u
β : Type v
hd : α
tl : List α
IH : ∀ (f : ℕ → α → β), (mapIdx f tl).length = tl.length
f : ℕ → α → β
⊢ (mapIdx f (hd :: tl)).length = (hd :: tl).length

tactic: rfl
state_before: case nil
α : Type u
β : Type v
f : ℕ → α → β
⊢ (mapIdx f []).length = [].length
state_after: no goals

tactic: simp [IH]
state_before: case cons
α : Type u
β : Type v
hd : α
tl : List α
IH : ∀ (f : ℕ → α → β), (mapIdx f tl).length = tl.length
f : ℕ → α → β
⊢ (mapIdx f (hd :: tl)).length = (hd :: tl).length
state_after: no goals
Theorem: IsCoercive.isClosed_range
File: Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean

tactic: rcases coercive.antilipschitz with ⟨_, _, antilipschitz⟩
state_before: V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
⊢ IsClosed ↑(range (continuousLinearMapOfBilin B))
state_after: case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
w✝ : ℝ≥0
left✝ : 0 < w✝
antilipschitz : AntilipschitzWith w✝ ⇑(continuousLinearMapOfBilin B)
⊢ IsClosed ↑(range (continuousLinearMapOfBilin B))

tactic: exact antilipschitz.isClosed_range B♯.uniformContinuous
state_before: case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
w✝ : ℝ≥0
left✝ : 0 < w✝
antilipschitz : AntilipschitzWith w✝ ⇑(continuousLinearMapOfBilin B)
⊢ IsClosed ↑(range (continuousLinearMapOfBilin B))
state_after: no goals
Theorem: Lists'.of_toList
File: Mathlib/SetTheory/Lists.lean

tactic: rw [h]
state_before: α : Type u_1
b : Bool
h : true = b
l : Lists' α b
⊢ Lists' α true
state_after: α : Type u_1
b : Bool
h : true = b
l : Lists' α b
⊢ Lists' α b

tactic: exact l
state_before: α : Type u_1
b : Bool
h : true = b
l : Lists' α b
⊢ Lists' α b
state_after: no goals

tactic: induction l with
| atom => cases h
| nil => simp
| cons' b a _ IH =>
  intro l'
  simpa [cons, l'] using IH rfl
state_before: α : Type u_1
b : Bool
h : true = b
l : Lists' α b
⊢ let l' := ⋯.mpr l;
  ofList l'.toList = l'
state_after: no goals

tactic: cases h
state_before: case atom
α : Type u_1
b : Bool
a✝ : α
h : true = false
⊢ let l' := ⋯.mpr (atom a✝);
  ofList l'.toList = l'
state_after: no goals

tactic: simp
state_before: case nil
α : Type u_1
b : Bool
h : true = true
⊢ let l' := ⋯.mpr nil;
  ofList l'.toList = l'
state_after: no goals

tactic: intro l'
state_before: case cons'
α : Type u_1
b✝¹ b✝ : Bool
b : Lists' α b✝
a : Lists' α true
a_ih✝ :
  ∀ (h : true = b✝),
    let l' := ⋯.mpr b;
    ofList l'.toList = l'
IH :
  ∀ (h : true = true),
    let l' := ⋯.mpr a;
    ofList l'.toList = l'
h : true = true
⊢ let l' := ⋯.mpr (b.cons' a);
  ofList l'.toList = l'
state_after: case cons'
α : Type u_1
b✝¹ b✝ : Bool
b : Lists' α b✝
a : Lists' α true
a_ih✝ :
  ∀ (h : true = b✝),
    let l' := ⋯.mpr b;
    ofList l'.toList = l'
IH :
  ∀ (h : true = true),
    let l' := ⋯.mpr a;
    ofList l'.toList = l'
h : true = true
l' : Lists' α true := ⋯.mpr (b.cons' a)
⊢ ofList l'.toList = l'

tactic: simpa [cons, l'] using IH rfl
state_before: case cons'
α : Type u_1
b✝¹ b✝ : Bool
b : Lists' α b✝
a : Lists' α true
a_ih✝ :
  ∀ (h : true = b✝),
    let l' := ⋯.mpr b;
    ofList l'.toList = l'
IH :
  ∀ (h : true = true),
    let l' := ⋯.mpr a;
    ofList l'.toList = l'
h : true = true
l' : Lists' α true := ⋯.mpr (b.cons' a)
⊢ ofList l'.toList = l'
state_after: no goals
Theorem: EuclideanDomain.mul_right_not_lt
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

tactic: rw [mul_comm]
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
h : a ≠ 0
⊢ ¬a * b ≺ b
state_after: R : Type u
inst✝ : EuclideanDomain R
a b : R
h : a ≠ 0
⊢ ¬b * a ≺ b

tactic: exact mul_left_not_lt b h
state_before: R : Type u
inst✝ : EuclideanDomain R
a b : R
h : a ≠ 0
⊢ ¬b * a ≺ b
state_after: no goals
Theorem: tendsto_pow_div_pow_atTop_zero
File: Mathlib/Analysis/Asymptotics/SpecificAsymptotics.lean

tactic: rw [tendsto_congr' pow_div_pow_eventuallyEq_atTop]
state_before: 𝕜 : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ Tendsto (fun x => x ^ p / x ^ q) atTop (𝓝 0)
state_after: 𝕜 : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ Tendsto (fun x => x ^ (↑p - ↑q)) atTop (𝓝 0)

tactic: apply tendsto_zpow_atTop_zero
state_before: 𝕜 : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ Tendsto (fun x => x ^ (↑p - ↑q)) atTop (𝓝 0)
state_after: case hn
𝕜 : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ ↑p - ↑q < 0

tactic: omega
state_before: case hn
𝕜 : Type u_1
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : ℕ
hpq : p < q
⊢ ↑p - ↑q < 0
state_after: no goals
Theorem: eventually_mapsTo_of_isCompact_absorbing_of_isOpen_of_omegaLimit_subset
File: Mathlib/Dynamics/OmegaLimit.lean

tactic: rcases eventually_closure_subset_of_isCompact_absorbing_of_isOpen_of_omegaLimit_subset f ϕ s hc₁
    hc₂ hn₁ hn₂ with
  ⟨u, hu_mem, hu⟩
state_before: τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
inst✝ : T2Space β
c : Set β
hc₁ : IsCompact c
hc₂ : ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s c
n : Set β
hn₁ : IsOpen n
hn₂ : ω f ϕ s ⊆ n
⊢ ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s n
state_after: case intro.intro
τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
inst✝ : T2Space β
c : Set β
hc₁ : IsCompact c
hc₂ : ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s c
n : Set β
hn₁ : IsOpen n
hn₂ : ω f ϕ s ⊆ n
u : Set τ
hu_mem : u ∈ f
hu : closure (image2 ϕ u s) ⊆ n
⊢ ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s n

tactic: refine mem_of_superset hu_mem fun t ht x hx ↦ ?_
state_before: case intro.intro
τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
inst✝ : T2Space β
c : Set β
hc₁ : IsCompact c
hc₂ : ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s c
n : Set β
hn₁ : IsOpen n
hn₂ : ω f ϕ s ⊆ n
u : Set τ
hu_mem : u ∈ f
hu : closure (image2 ϕ u s) ⊆ n
⊢ ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s n
state_after: case intro.intro
τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
inst✝ : T2Space β
c : Set β
hc₁ : IsCompact c
hc₂ : ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s c
n : Set β
hn₁ : IsOpen n
hn₂ : ω f ϕ s ⊆ n
u : Set τ
hu_mem : u ∈ f
hu : closure (image2 ϕ u s) ⊆ n
t : τ
ht : t ∈ u
x : α
hx : x ∈ s
⊢ ϕ t x ∈ n

tactic: exact hu (subset_closure <| mem_image2_of_mem ht hx)
state_before: case intro.intro
τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝¹ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
inst✝ : T2Space β
c : Set β
hc₁ : IsCompact c
hc₂ : ∀ᶠ (t : τ) in f, MapsTo (ϕ t) s c
n : Set β
hn₁ : IsOpen n
hn₂ : ω f ϕ s ⊆ n
u : Set τ
hu_mem : u ∈ f
hu : closure (image2 ϕ u s) ⊆ n
t : τ
ht : t ∈ u
x : α
hx : x ∈ s
⊢ ϕ t x ∈ n
state_after: no goals
Theorem: Path.truncate_zero_one
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: simp [zero_le_one, extend_zero]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ : Path x y
a b : X
γ : Path a b
⊢ γ.extend (min 0 1) = a
state_after: no goals

tactic: simp
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ : Path x y
a b : X
γ : Path a b
⊢ γ.extend 1 = b
state_after: no goals

tactic: ext x
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
γ✝ : Path x y
a b : X
γ : Path a b
⊢ γ.truncate 0 1 = γ.cast ⋯ ⋯
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
γ✝ : Path x✝ y
a b : X
γ : Path a b
x : ↑I
⊢ (γ.truncate 0 1) x = (γ.cast ⋯ ⋯) x

tactic: rw [cast_coe]
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
γ✝ : Path x✝ y
a b : X
γ : Path a b
x : ↑I
⊢ (γ.truncate 0 1) x = (γ.cast ⋯ ⋯) x
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
γ✝ : Path x✝ y
a b : X
γ : Path a b
x : ↑I
⊢ (γ.truncate 0 1) x = γ x

tactic: have : ↑x ∈ (Icc 0 1 : Set ℝ) := x.2
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
γ✝ : Path x✝ y
a b : X
γ : Path a b
x : ↑I
⊢ (γ.truncate 0 1) x = γ x
state_after: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
γ✝ : Path x✝ y
a b : X
γ : Path a b
x : ↑I
this : ↑x ∈ Icc 0 1
⊢ (γ.truncate 0 1) x = γ x

tactic: rw [truncate, coe_mk_mk, max_eq_left this.1, min_eq_left this.2, extend_extends']
state_before: case a.h
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
γ✝ : Path x✝ y
a b : X
γ : Path a b
x : ↑I
this : ↑x ∈ Icc 0 1
⊢ (γ.truncate 0 1) x = γ x
state_after: no goals
Theorem: CategoryTheory.GrothendieckTopology.OneHypercover.mem_sieve₁'
File: Mathlib/CategoryTheory/Sites/OneHypercover.lean

tactic: rw [E.sieve₁'_eq_sieve₁]
state_before: C : Type u
inst✝² : Category.{v, u} C
A : Type u_1
inst✝¹ : Category.{?u.20462, u_1} A
J : GrothendieckTopology C
S : C
E : J.OneHypercover S
i₁ i₂ : E.I₀
inst✝ : HasPullback (E.f i₁) (E.f i₂)
⊢ E.sieve₁' i₁ i₂ ∈ J.sieves (Limits.pullback (E.f i₁) (E.f i₂))
state_after: C : Type u
inst✝² : Category.{v, u} C
A : Type u_1
inst✝¹ : Category.{?u.20462, u_1} A
J : GrothendieckTopology C
S : C
E : J.OneHypercover S
i₁ i₂ : E.I₀
inst✝ : HasPullback (E.f i₁) (E.f i₂)
⊢ E.sieve₁ pullback.fst pullback.snd ∈ J.sieves (Limits.pullback (E.f i₁) (E.f i₂))

tactic: exact mem₁ _ _ _ _ _ pullback.condition
state_before: C : Type u
inst✝² : Category.{v, u} C
A : Type u_1
inst✝¹ : Category.{?u.20462, u_1} A
J : GrothendieckTopology C
S : C
E : J.OneHypercover S
i₁ i₂ : E.I₀
inst✝ : HasPullback (E.f i₁) (E.f i₂)
⊢ E.sieve₁ pullback.fst pullback.snd ∈ J.sieves (Limits.pullback (E.f i₁) (E.f i₂))
state_after: no goals
Theorem: IsClosed.cthickening_eq_biUnion_closedBall
File: Mathlib/Topology/MetricSpace/Thickening.lean

tactic: rw [cthickening_eq_biUnion_closedBall E hδ, hE.closure_eq]
state_before: ι : Sort u_1
α✝ : Type u
β : Type v
inst✝² : PseudoEMetricSpace α✝
δ ε : ℝ
s t : Set α✝
x : α✝
α : Type u_2
inst✝¹ : PseudoMetricSpace α
inst✝ : ProperSpace α
E : Set α
hE : IsClosed E
hδ : 0 ≤ δ
⊢ cthickening δ E = ⋃ x ∈ E, closedBall x δ
state_after: no goals
Theorem: AlgebraicGeometry.IsAffineOpen.fromSpec_primeIdealOf
File: Mathlib/AlgebraicGeometry/AffineScheme.lean

tactic: dsimp only [IsAffineOpen.fromSpec, Subtype.coe_mk, IsAffineOpen.primeIdealOf]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ hU.fromSpec.val.base (hU.primeIdealOf x) = ↑x
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ (Spec.map (X.presheaf.map (eqToHom ⋯).op) ≫ (X.restrict ⋯).isoSpec.inv ≫ Scheme.ιOpens U).val.base
      (((X.restrict ⋯).isoSpec.hom ≫ Spec.map (X.presheaf.map (eqToHom ⋯).op)).val.base x) =
    ↑x

tactic: erw [← elementwise_of% Scheme.comp_val_base]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ (Spec.map (X.presheaf.map (eqToHom ⋯).op) ≫ (X.restrict ⋯).isoSpec.inv ≫ Scheme.ιOpens U).val.base
      (((X.restrict ⋯).isoSpec.hom ≫ Spec.map (X.presheaf.map (eqToHom ⋯).op)).val.base x) =
    ↑x
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ (((X.restrict ⋯).isoSpec.hom ≫ Spec.map (X.presheaf.map (eqToHom ⋯).op)) ≫
            Spec.map (X.presheaf.map (eqToHom ⋯).op) ≫ (X.restrict ⋯).isoSpec.inv ≫ Scheme.ιOpens U).val.base
      x =
    ↑x

tactic: simp only [Scheme.restrict_carrier, Scheme.restrict_presheaf_obj, unop_op, Category.assoc, ←
  Spec.map_comp_assoc, ← Functor.map_comp, ← op_comp, eqToHom_trans, eqToHom_refl, op_id,
  CategoryTheory.Functor.map_id, Spec.map_id, Category.id_comp, Iso.hom_inv_id_assoc,
  Scheme.ofRestrict_val_base]
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ (((X.restrict ⋯).isoSpec.hom ≫ Spec.map (X.presheaf.map (eqToHom ⋯).op)) ≫
            Spec.map (X.presheaf.map (eqToHom ⋯).op) ≫ (X.restrict ⋯).isoSpec.inv ≫ Scheme.ιOpens U).val.base
      x =
    ↑x
state_after: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ U.inclusion x = ↑x

tactic: rfl
state_before: X Y : Scheme
U : Opens ↑↑X.toPresheafedSpace
hU : IsAffineOpen U
f : ↑Γ(X, U)
x : ↥U
⊢ U.inclusion x = ↑x
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.const_lintegral
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: rw [lintegral]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
⊢ (const α c).lintegral μ = c * μ univ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
⊢ ∑ x ∈ (const α c).range, x * μ (↑(const α c) ⁻¹' {x}) = c * μ univ

tactic: cases isEmpty_or_nonempty α
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
⊢ ∑ x ∈ (const α c).range, x * μ (↑(const α c) ⁻¹' {x}) = c * μ univ
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : IsEmpty α
⊢ ∑ x ∈ (const α c).range, x * μ (↑(const α c) ⁻¹' {x}) = c * μ univ

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : Nonempty α
⊢ ∑ x ∈ (const α c).range, x * μ (↑(const α c) ⁻¹' {x}) = c * μ univ

tactic: simp [μ.eq_zero_of_isEmpty]
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : IsEmpty α
⊢ ∑ x ∈ (const α c).range, x * μ (↑(const α c) ⁻¹' {x}) = c * μ univ
state_after: no goals

tactic: simp
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : Nonempty α
⊢ ∑ x ∈ (const α c).range, x * μ (↑(const α c) ⁻¹' {x}) = c * μ univ
state_after: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : Nonempty α
⊢ c * μ (Function.const α c ⁻¹' {c}) = c * μ univ

tactic: unfold Function.const
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : Nonempty α
⊢ c * μ (Function.const α c ⁻¹' {c}) = c * μ univ
state_after: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : Nonempty α
⊢ c * μ ((fun x => c) ⁻¹' {c}) = c * μ univ

tactic: rw [preimage_const_of_mem (mem_singleton c)]
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
h✝ : Nonempty α
⊢ c * μ ((fun x => c) ⁻¹' {c}) = c * μ univ
state_after: no goals
Theorem: legendreSym.quadratic_reciprocity_one_mod_four
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticReciprocity.lean

tactic: rw [quadratic_reciprocity' (Prime.mod_two_eq_one_iff_ne_two.mp (odd_of_mod_four_eq_one hp)) hq,
  pow_mul, neg_one_pow_div_two_of_one_mod_four hp, one_pow, one_mul]
state_before: p q : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Fact (Nat.Prime q)
hp : p % 4 = 1
hq : q ≠ 2
⊢ legendreSym q ↑p = legendreSym p ↑q
state_after: no goals
Theorem: toIcoMod_zero_one
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simp [toIcoMod_eq_add_fract_mul]
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
p : α
hp : 0 < p
b : α
⊢ toIcoMod ⋯ 0 b = Int.fract b
state_after: no goals
Theorem: ENNReal.mul_le_of_le_div
File: Mathlib/Data/ENNReal/Inv.lean

tactic: rw [← inv_inv c]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b / c
⊢ a * c ≤ b
state_after: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b / c
⊢ a * c⁻¹⁻¹ ≤ b

tactic: exact div_le_of_le_mul h
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h : a ≤ b / c
⊢ a * c⁻¹⁻¹ ≤ b
state_after: no goals
Theorem: monotone_iff_forall_covBy
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: refine ⟨fun hf _ _ h ↦ hf h.le, fun h a b hab ↦ ?_⟩
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
inst✝ : Preorder β
f : α → β
⊢ Monotone f ↔ ∀ (a b : α), a ⋖ b → f a ≤ f b
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
inst✝ : Preorder β
f : α → β
h : ∀ (a b : α), a ⋖ b → f a ≤ f b
a b : α
hab : a ≤ b
⊢ f a ≤ f b
Theorem: Set.right_mem_Icc
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: simp [le_refl]
state_before: α : Type u_1
β : Type u_2
inst✝ : Preorder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ b ∈ Icc a b ↔ a ≤ b
state_after: no goals
Theorem: Nat.mem_rfind
File: Mathlib/Computability/Partrec.lean

tactic: let ⟨m, hm⟩ := dom_iff_mem.1 <| (@rfind_dom p).2 ⟨_, h₁, fun {m} mn => (h₂ mn).fst⟩
state_before: p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
⊢ n ∈ rfind p
state_after: p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
⊢ n ∈ rfind p

tactic: rcases lt_trichotomy m n with (h | h | h)
state_before: p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
⊢ n ∈ rfind p
state_after: case inl
p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
h : m < n
⊢ n ∈ rfind p

case inr.inl
p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
h : m = n
⊢ n ∈ rfind p

case inr.inr
p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
h : n < m
⊢ n ∈ rfind p

tactic: injection mem_unique (h₂ h) (rfind_spec hm)
state_before: case inl
p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
h : m < n
⊢ n ∈ rfind p
state_after: no goals

tactic: rwa [← h]
state_before: case inr.inl
p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
h : m = n
⊢ n ∈ rfind p
state_after: no goals

tactic: injection mem_unique h₁ (rfind_min hm h)
state_before: case inr.inr
p : ℕ →. Bool
n : ℕ
x✝ : true ∈ p n ∧ ∀ {m : ℕ}, m < n → false ∈ p m
h₁ : true ∈ p n
h₂ : ∀ {m : ℕ}, m < n → false ∈ p m
m : ℕ
hm : m ∈ rfind p
h : n < m
⊢ n ∈ rfind p
state_after: no goals
Theorem: Nat.Partrec.Code.eval_eq_rfindOpt
File: Mathlib/Computability/PartrecCode.lean

tactic: refine evaln_complete.trans (Nat.rfindOpt_mono ?_).symm
state_before: c : Code
n x : ℕ
⊢ x ∈ c.eval n ↔ x ∈ rfindOpt fun k => evaln k c n
state_after: c : Code
n x : ℕ
⊢ ∀ {a m n_1 : ℕ}, m ≤ n_1 → a ∈ evaln m c n → a ∈ evaln n_1 c n

tactic: intro a m n hl
state_before: c : Code
n x : ℕ
⊢ ∀ {a m n_1 : ℕ}, m ≤ n_1 → a ∈ evaln m c n → a ∈ evaln n_1 c n
state_after: c : Code
n✝ x a m n : ℕ
hl : m ≤ n
⊢ a ∈ evaln m c n✝ → a ∈ evaln n c n✝

tactic: apply evaln_mono hl
state_before: c : Code
n✝ x a m n : ℕ
hl : m ≤ n
⊢ a ∈ evaln m c n✝ → a ∈ evaln n c n✝
state_after: no goals
Theorem: IsPrimitiveRoot.not_exists_int_prime_dvd_sub_of_prime_ne_two'
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

tactic: have : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K := by simpa using hcycl
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
⊢ ¬∃ n, ↑↑p ∣ hζ.toInteger - ↑n
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
⊢ ¬∃ n, ↑↑p ∣ hζ.toInteger - ↑n

tactic: replace hζ : IsPrimitiveRoot ζ (p ^ (0 + 1)) := by simpa using hζ
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
⊢ ¬∃ n, ↑↑p ∣ hζ.toInteger - ↑n
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ✝ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ (↑p ^ (0 + 1))
⊢ ¬∃ n, ↑↑p ∣ hζ✝.toInteger - ↑n

tactic: exact not_exists_int_prime_dvd_sub_of_prime_ne_two hζ hodd
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ✝ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
hζ : IsPrimitiveRoot ζ (↑p ^ (0 + 1))
⊢ ¬∃ n, ↑↑p ∣ hζ✝.toInteger - ↑n
state_after: no goals

tactic: simpa using hcycl
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
⊢ IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
state_after: no goals

tactic: simpa using hζ
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝¹ : Field K
inst✝ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
hcycl : IsCyclotomicExtension {p} ℚ K
hζ : IsPrimitiveRoot ζ ↑p
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K
⊢ IsPrimitiveRoot ζ (↑p ^ (0 + 1))
state_after: no goals