tasksource/leandojo huggingface dataset:
Theorem: bot_topologicalSpace_eq_generateFrom_of_pred_succOrder
File: Mathlib/Topology/Instances/Discrete.lean

tactic: refine' (eq_bot_of_singletons_open fun a => _).symm
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
⊢ ⊥ = generateFrom {s | ∃ a, s = Ioi a ∨ s = Iio a}

tactic: rw [h_singleton_eq_inter]
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)
⊢ IsOpen {a}

tactic: apply @IsOpen.inter _ _ _ (generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a })
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)
⊢ IsOpen (Iio (succ a) ∩ Ioi (pred a))

tactic: suffices h_singleton_eq_inter' : {a} = Iic a ∩ Ici a
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
⊢ {a} = Iio (succ a) ∩ Ioi (pred a)

tactic: rw [inter_comm, Ici_inter_Iic, Icc_self a]
state_before: case h_singleton_eq_inter'
α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
⊢ {a} = Iic a ∩ Ici a

tactic: rw [h_singleton_eq_inter', ← Ioi_pred, ← Iio_succ]
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
h_singleton_eq_inter' : {a} = Iic a ∩ Ici a
⊢ {a} = Iio (succ a) ∩ Ioi (pred a)

tactic: exact isOpen_generateFrom_of_mem ⟨succ a, Or.inr rfl⟩
state_before: case h₁
α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)
⊢ IsOpen (Iio (succ a))

tactic: exact isOpen_generateFrom_of_mem ⟨pred a, Or.inl rfl⟩
state_before: case h₂
α : Type u_1
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PartialOrder α
inst✝³ : PredOrder α
inst✝² : SuccOrder α
inst✝¹ : NoMinOrder α
inst✝ : NoMaxOrder α
a : α
h_singleton_eq_inter : {a} = Iio (succ a) ∩ Ioi (pred a)
⊢ IsOpen (Ioi (pred a))
Theorem: Nat.cast_lt_one
File: Mathlib/Data/Nat/Cast/Basic.lean

tactic: rw [← cast_one, cast_lt, lt_succ_iff, ← bot_eq_zero, le_bot_iff]
state_before: α : Type u_1
β : Type ?u.19535
inst✝¹ : OrderedSemiring α
inst✝ : CharZero α
m n : ℕ
⊢ ↑n < 1 ↔ n = 0
Theorem: MeasureTheory.AECover.aemeasurable
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

tactic: obtain ⟨u, hu⟩ := l.exists_seq_tendsto
state_before: α : Type u_3
ι : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
l : Filter ι
β : Type u_1
inst✝² : MeasurableSpace β
inst✝¹ : IsCountablyGenerated l
inst✝ : NeBot l
f : α → β
φ : ι → Set α
hφ : AECover μ l φ
hfm : ∀ (i : ι), AEMeasurable f
⊢ AEMeasurable f

tactic: have := aemeasurable_iUnion_iff.mpr fun n : ℕ => hfm (u n)
state_before: case intro
α : Type u_3
ι : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
l : Filter ι
β : Type u_1
inst✝² : MeasurableSpace β
inst✝¹ : IsCountablyGenerated l
inst✝ : NeBot l
f : α → β
φ : ι → Set α
hφ : AECover μ l φ
hfm : ∀ (i : ι), AEMeasurable f
u : ℕ → ι
hu : Tendsto u atTop l
⊢ AEMeasurable f

tactic: rwa [Measure.restrict_eq_self_of_ae_mem] at this
state_before: case intro
α : Type u_3
ι : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
l : Filter ι
β : Type u_1
inst✝² : MeasurableSpace β
inst✝¹ : IsCountablyGenerated l
inst✝ : NeBot l
f : α → β
φ : ι → Set α
hφ : AECover μ l φ
hfm : ∀ (i : ι), AEMeasurable f
u : ℕ → ι
hu : Tendsto u atTop l
this : AEMeasurable f
⊢ AEMeasurable f

tactic: filter_upwards [hφ.ae_eventually_mem] with x hx using
  mem_iUnion.mpr (hu.eventually hx).exists
state_before: case intro.hs
α : Type u_3
ι : Type u_2
inst✝³ : MeasurableSpace α
μ : Measure α
l : Filter ι
β : Type u_1
inst✝² : MeasurableSpace β
inst✝¹ : IsCountablyGenerated l
inst✝ : NeBot l
f : α → β
φ : ι → Set α
hφ : AECover μ l φ
hfm : ∀ (i : ι), AEMeasurable f
u : ℕ → ι
hu : Tendsto u atTop l
this : AEMeasurable f
⊢ ∀ᵐ (x : α) ∂μ, x ∈ ⋃ (i : ℕ), φ (u i)
Theorem: StrictConvexSpace.ofNormAdd
File: Mathlib/Analysis/Convex/StrictConvexSpace.lean

tactic: refine' StrictConvexSpace.ofPairwiseSphereNormNeTwo fun x hx y hy => mt fun h₂ => _
state_before: 𝕜 : Type ?u.39174
E : Type u_1
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y
⊢ StrictConvexSpace ℝ E

tactic: rw [mem_sphere_zero_iff_norm] at hx hy
state_before: 𝕜 : Type ?u.39174
E : Type u_1
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y
x : E
hx : x ∈ sphere 0 1
y : E
hy : y ∈ sphere 0 1
h₂ : ‖x + y‖ = 2
⊢ x = y

tactic: exact (sameRay_iff_of_norm_eq (hx.trans hy.symm)).1 (h x y hx hy h₂)
state_before: 𝕜 : Type ?u.39174
E : Type u_1
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
h₂ : ‖x + y‖ = 2
⊢ x = y
Theorem: Set.div_zero_subset
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simp [subset_def, mem_div]
state_before: F : Type ?u.138838
α : Type u_1
β : Type ?u.138844
γ : Type ?u.138847
inst✝ : GroupWithZero α
s✝ t s : Set α
⊢ s / 0 ⊆ 0
Theorem: CategoryTheory.Limits.mono_of_source_iso_zero
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: rw [zero_of_target_iso_zero g i, zero_of_target_iso_zero h i]
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
i : X ≅ 0
Z : C
g h : Z ⟶ X
x✝ : g ≫ f = h ≫ f
⊢ g = h
Theorem: Rat.cast_div_of_ne_zero
File: Mathlib/Data/Rat/Cast.lean

tactic: have : (n⁻¹.den : ℤ) ∣ n.num := by
  conv in n⁻¹.den => rw [← @num_den n, inv_def']
  apply den_dvd
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
⊢ ↑(m / n) = ↑m / ↑n

tactic: have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h => by
  let ⟨k, e⟩ := this
  have := congr_arg ((↑) : ℤ → α) e ; rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
this : ↑n⁻¹.den ∣ n.num
⊢ ↑(m / n) = ↑m / ↑n

tactic: rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
this✝ : ↑n⁻¹.den ∣ n.num
this : ↑n⁻¹.den = 0 → ↑n.num = 0
⊢ ↑(m / n) = ↑m / ↑n

tactic: conv in n⁻¹.den => rw [← @num_den n, inv_def']
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
⊢ ↑n⁻¹.den ∣ n.num

tactic: apply den_dvd
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
⊢ ↑(↑n.den /. n.num).den ∣ n.num

tactic: let ⟨k, e⟩ := this
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
this : ↑n⁻¹.den ∣ n.num
h : ↑n⁻¹.den = 0
⊢ ↑n.num = 0

tactic: have := congr_arg ((↑) : ℤ → α) e
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
this : ↑n⁻¹.den ∣ n.num
h : ↑n⁻¹.den = 0
k : ℤ
e : n.num = ↑n⁻¹.den * k
⊢ ↑n.num = 0

tactic: rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
state_before: F : Type ?u.37416
ι : Type ?u.37419
α : Type u_1
β : Type ?u.37425
inst✝ : DivisionRing α
m n : ℚ
md : ↑m.den ≠ 0
nn : ↑n.num ≠ 0
nd : ↑n.den ≠ 0
this✝ : ↑n⁻¹.den ∣ n.num
h : ↑n⁻¹.den = 0
k : ℤ
e : n.num = ↑n⁻¹.den * k
this : ↑n.num = ↑(↑n⁻¹.den * k)
⊢ ↑n.num = 0
Theorem: Pell.pellZd_succ_succ
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have : (1 : ℤ√(d a1)) + ⟨a, 1⟩ * ⟨a, 1⟩ = ⟨a, 1⟩ * (2 * a) := by
  rw [Zsqrtd.coe_nat_val]
  change (⟨_, _⟩ : ℤ√(d a1)) = ⟨_, _⟩
  rw [dz_val]
  dsimp [az]
  rw [Zsqrtd.ext]
  dsimp
  constructor <;> ring_nf
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ pellZd a1 (n + 2) + pellZd a1 n = ↑(2 * a) * pellZd a1 (n + 1)

tactic: rw [Zsqrtd.coe_nat_val]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ 1 + { re := ↑a, im := 1 } * { re := ↑a, im := 1 } = { re := ↑a, im := 1 } * (2 * ↑a)

tactic: change (⟨_, _⟩ : ℤ√(d a1)) = ⟨_, _⟩
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ 1 + { re := ↑a, im := 1 } * { re := ↑a, im := 1 } = { re := ↑a, im := 1 } * (2 * { re := ↑a, im := 0 })

tactic: rw [dz_val]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ { re := 1.re + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).re,
      im := 1.im + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).im } =
    {
      re :=
        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).re +
          ↑(Pell.d a1) * { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).im,
      im :=
        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).im +
          { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).re }

tactic: dsimp [az]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ { re := 1.re + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).re,
      im := 1.im + ({ re := ↑a, im := 1 } * { re := ↑a, im := 1 }).im } =
    {
      re :=
        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).re +
          (az a * az a - 1) * { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).im,
      im :=
        { re := ↑a, im := 1 }.re * (2 * { re := ↑a, im := 0 }).im +
          { re := ↑a, im := 1 }.im * (2 * { re := ↑a, im := 0 }).re }

tactic: rw [Zsqrtd.ext]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ { re := 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1), im := 0 + (↑a * 1 + 1 * ↑a) } =
    { re := ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a),
      im := ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) }

tactic: dsimp
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ { re := 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1), im := 0 + (↑a * 1 + 1 * ↑a) }.re =
      { re := ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a),
          im := ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) }.re ∧
    { re := 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1), im := 0 + (↑a * 1 + 1 * ↑a) }.im =
      { re := ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a),
          im := ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) }.im

tactic: constructor <;> ring_nf
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ 1 + (↑a * ↑a + (↑a * ↑a - 1) * 1 * 1) =
      ↑a * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0) + (↑a * ↑a - 1) * 1 * (↑2 * 0 + 0 * ↑a) ∧
    0 + (↑a * 1 + 1 * ↑a) = ↑a * (↑2 * 0 + 0 * ↑a) + 1 * (↑2 * ↑a + (↑a * ↑a - 1) * 0 * 0)
Theorem: Finset.nonempty_Icc
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_nonempty, coe_Icc, Set.nonempty_Icc]
state_before: ι : Type ?u.50
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Finset.Nonempty (Icc a b) ↔ a ≤ b
Theorem: Primrec.dom_fintype
File: Mathlib/Computability/Primrec.lean

tactic: haveI := decidableEqOfEncodable α
state_before: α : Type u_1
β : Type ?u.157316
γ : Type ?u.157319
δ : Type ?u.157322
σ : Type u_2
inst✝⁵ : Primcodable α
inst✝⁴ : Primcodable β
inst✝³ : Primcodable γ
inst✝² : Primcodable δ
inst✝¹ : Primcodable σ
inst✝ : Fintype α
f : α → σ
l : List α
left✝ : List.Nodup l
m : ∀ (x : α), x ∈ l
⊢ Primrec fun a => some (f a)

tactic: refine ((list_get?₁ (l.map f)).comp (list_indexOf₁ l)).of_eq fun a => ?_
state_before: α : Type u_1
β : Type ?u.157316
γ : Type ?u.157319
δ : Type ?u.157322
σ : Type u_2
inst✝⁵ : Primcodable α
inst✝⁴ : Primcodable β
inst✝³ : Primcodable γ
inst✝² : Primcodable δ
inst✝¹ : Primcodable σ
inst✝ : Fintype α
f : α → σ
l : List α
left✝ : List.Nodup l
m : ∀ (x : α), x ∈ l
this : DecidableEq α
⊢ Primrec fun a => some (f a)

tactic: rw [List.get?_map, List.indexOf_get? (m a), Option.map_some']
state_before: α : Type u_1
β : Type ?u.157316
γ : Type ?u.157319
δ : Type ?u.157322
σ : Type u_2
inst✝⁵ : Primcodable α
inst✝⁴ : Primcodable β
inst✝³ : Primcodable γ
inst✝² : Primcodable δ
inst✝¹ : Primcodable σ
inst✝ : Fintype α
f : α → σ
l : List α
left✝ : List.Nodup l
m : ∀ (x : α), x ∈ l
this : DecidableEq α
a : α
⊢ List.get? (List.map f l) (List.indexOf a l) = some (f a)
Theorem: MeasureTheory.ae_restrict_union_iff
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.560456
γ : Type ?u.560459
δ : Type ?u.560462
ι : Type ?u.560465
R : Type ?u.560468
R' : Type ?u.560471
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ s t : Set α
p : α → Prop
⊢ (∀ᵐ (x : α) ∂Measure.restrict μ (s ∪ t), p x) ↔
    (∀ᵐ (x : α) ∂Measure.restrict μ s, p x) ∧ ∀ᵐ (x : α) ∂Measure.restrict μ t, p x
Theorem: Polynomial.card_roots_sub_C
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [sub_eq_add_neg, ← C_neg]
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
a : R
hp0 : 0 < degree p
⊢ degree (p - ↑C a) = degree p

tactic: exact degree_add_C hp0
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
a : R
hp0 : 0 < degree p
⊢ degree (p + ↑C (-a)) = degree p
Theorem: Set.sInter_eq_empty_iff
File: Mathlib/Data/Set/Lattice.lean

tactic: simp [Set.eq_empty_iff_forall_not_mem]
state_before: α : Type u_1
β : Type ?u.131860
γ : Type ?u.131863
ι : Sort ?u.131866
ι' : Sort ?u.131869
ι₂ : Sort ?u.131872
κ : ι → Sort ?u.131877
κ₁ : ι → Sort ?u.131882
κ₂ : ι → Sort ?u.131887
κ' : ι' → Sort ?u.131892
c : Set (Set α)
⊢ ⋂₀ c = ∅ ↔ ∀ (a : α), ∃ b, b ∈ c ∧ ¬a ∈ b
Theorem: Set.Finite.inter_of_left
File: Mathlib/Data/Set/Finite.lean

tactic: cases hs
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
hs : Set.Finite s
t : Set α
⊢ Set.Finite (s ∩ t)

tactic: apply toFinite
state_before: case intro
α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a✝ : Fintype ↑s
⊢ Set.Finite (s ∩ t)
Theorem: strictMono_restrict
File: Mathlib/Data/Set/Function.lean

tactic: simp [Set.restrict, StrictMono, StrictMonoOn]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.101627
ι : Sort ?u.101630
π : α → Type ?u.101635
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
s : Set α
⊢ StrictMono (restrict s f) ↔ StrictMonoOn f s
Theorem: edist_lt_ofReal
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [edist_dist, ENNReal.ofReal_lt_ofReal_iff_of_nonneg dist_nonneg]
state_before: α : Type u
β : Type v
X : Type ?u.22805
ι : Type ?u.22808
inst✝ : PseudoMetricSpace α
x y : α
r : ℝ
⊢ edist x y < ENNReal.ofReal r ↔ dist x y < r
Theorem: Zsqrtd.le_of_add_le_add_left
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simpa using Zsqrtd.add_le_add_left _ _ h (-c)
state_before: d : ℕ
a b c : ℤ√↑d
h : c + a ≤ c + b
⊢ a ≤ b
Theorem: Nat.totient_mul_of_prime_of_dvd
File: Mathlib/Data/Nat/Totient.lean

tactic: have h1 := totient_gcd_mul_totient_mul p n
state_before: p n : ℕ
hp : Prime p
h : p ∣ n
⊢ φ (p * n) = p * φ n

tactic: rw [gcd_eq_left h, mul_assoc] at h1
state_before: p n : ℕ
hp : Prime p
h : p ∣ n
h1 : φ (gcd p n) * φ (p * n) = φ p * φ n * gcd p n
⊢ φ (p * n) = p * φ n

tactic: simpa [(totient_pos hp.pos).ne', mul_comm] using h1
state_before: p n : ℕ
hp : Prime p
h : p ∣ n
h1 : φ p * φ (p * n) = φ p * (φ n * p)
⊢ φ (p * n) = p * φ n
Theorem: MeasurableEmbedding.integral_map
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: by_cases hgm : AEStronglyMeasurable g (Measure.map f μ)
state_before: α : Type u_2
E : Type u_3
F : Type ?u.1387726
𝕜 : Type ?u.1387729
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g✝ : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1390420
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
ν : Measure α
β : Type u_1
x✝ : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
g : β → E
⊢ (∫ (y : β), g y ∂Measure.map f μ) = ∫ (x : α), g (f x) ∂μ

tactic: exact MeasureTheory.integral_map hf.measurable.aemeasurable hgm
state_before: case pos
α : Type u_2
E : Type u_3
F : Type ?u.1387726
𝕜 : Type ?u.1387729
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g✝ : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1390420
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
ν : Measure α
β : Type u_1
x✝ : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
g : β → E
hgm : AEStronglyMeasurable g (Measure.map f μ)
⊢ (∫ (y : β), g y ∂Measure.map f μ) = ∫ (x : α), g (f x) ∂μ

tactic: rw [integral_non_aestronglyMeasurable hgm, integral_non_aestronglyMeasurable]
state_before: case neg
α : Type u_2
E : Type u_3
F : Type ?u.1387726
𝕜 : Type ?u.1387729
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g✝ : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1390420
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
ν : Measure α
β : Type u_1
x✝ : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
g : β → E
hgm : ¬AEStronglyMeasurable g (Measure.map f μ)
⊢ (∫ (y : β), g y ∂Measure.map f μ) = ∫ (x : α), g (f x) ∂μ

tactic: refine' fun hgf => hgm (hf.aestronglyMeasurable_map_iff.2 hgf)
state_before: case neg
α : Type u_2
E : Type u_3
F : Type ?u.1387726
𝕜 : Type ?u.1387729
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g✝ : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1390420
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
ν : Measure α
β : Type u_1
x✝ : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
g : β → E
hgm : ¬AEStronglyMeasurable g (Measure.map f μ)
⊢ ¬AEStronglyMeasurable (fun x => g (f x)) μ
Theorem: String.Pos.Valid.le_endPos
File: Std/Data/String/Lemmas.lean

tactic: simp [Nat.le_add_right]
state_before: cs cs' : List Char
⊢ { byteIdx := utf8ByteSize.go cs } ≤ endPos { data := cs ++ cs' }
Theorem: Std.AssocList.replace_toList
File: Std/Data/AssocList.lean

tactic: induction l <;> simp [replace]
state_before: α : Type u_1
β : Type u_2
inst✝ : BEq α
a : α
b : β
l : AssocList α β
⊢ toList (replace a b l) = List.replaceF (fun x => bif x.fst == a then some (a, b) else none) (toList l)

tactic: split <;> simp [*]
state_before: case cons
α : Type u_1
β : Type u_2
inst✝ : BEq α
a : α
b : β
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ :
  toList (replace a b tail✝) = List.replaceF (fun x => bif x.fst == a then some (a, b) else none) (toList tail✝)
⊢ toList
      (match key✝ == a with
      | true => cons a b tail✝
      | false => cons key✝ value✝ (replace a b tail✝)) =
    match bif key✝ == a then some (a, b) else none with
    | none => (key✝, value✝) :: List.replaceF (fun x => bif x.fst == a then some (a, b) else none) (toList tail✝)
    | some a => a :: toList tail✝
Theorem: Polynomial.roots_multiset_prod
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rcases m with ⟨L⟩
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
m : Multiset R[X]
⊢ ¬0 ∈ m → roots (prod m) = Multiset.bind m roots

tactic: simpa only [Multiset.coe_prod, quot_mk_to_coe''] using roots_list_prod L
state_before: case mk
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
m : Multiset R[X]
L : List R[X]
⊢ ¬0 ∈ Quot.mk Setoid.r L → roots (prod (Quot.mk Setoid.r L)) = Multiset.bind (Quot.mk Setoid.r L) roots
Theorem: le_sup_of_mem_convexHull
File: Mathlib/Analysis/Convex/Jensen.lean

tactic: obtain ⟨w, hw₀, hw₁, rfl⟩ := mem_convexHull.1 hx
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.35552
β : Type u_3
ι : Type ?u.35558
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s✝ : Set E
f : E → β
t : Finset ι
w : ι → 𝕜
p : ι → E
x : E
s : Finset E
hf : ConvexOn 𝕜 (↑(convexHull 𝕜).toOrderHom ↑s) f
hx : x ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ f x ≤ sup' s (_ : Finset.Nonempty s) f

tactic: exact (hf.map_centerMass_le hw₀ (by positivity) <| subset_convexHull _ _).trans
  (centerMass_le_sup hw₀ <| by positivity)
state_before: case intro.intro.intro
𝕜 : Type u_2
E : Type u_1
F : Type ?u.35552
β : Type u_3
ι : Type ?u.35558
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s✝ : Set E
f : E → β
t : Finset ι
w✝ : ι → 𝕜
p : ι → E
s : Finset E
hf : ConvexOn 𝕜 (↑(convexHull 𝕜).toOrderHom ↑s) f
w : E → 𝕜
hw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y
hw₁ : ∑ y in s, w y = 1
hx : centerMass s w _root_.id ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ f (centerMass s w _root_.id) ≤ sup' s (_ : Finset.Nonempty s) f

tactic: positivity
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.35552
β : Type u_3
ι : Type ?u.35558
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s✝ : Set E
f : E → β
t : Finset ι
w✝ : ι → 𝕜
p : ι → E
s : Finset E
hf : ConvexOn 𝕜 (↑(convexHull 𝕜).toOrderHom ↑s) f
w : E → 𝕜
hw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y
hw₁ : ∑ y in s, w y = 1
hx : centerMass s w _root_.id ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ 0 < ∑ i in s, w i

tactic: positivity
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.35552
β : Type u_3
ι : Type ?u.35558
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s✝ : Set E
f : E → β
t : Finset ι
w✝ : ι → 𝕜
p : ι → E
s : Finset E
hf : ConvexOn 𝕜 (↑(convexHull 𝕜).toOrderHom ↑s) f
w : E → 𝕜
hw₀ : ∀ (y : E), y ∈ s → 0 ≤ w y
hw₁ : ∑ y in s, w y = 1
hx : centerMass s w _root_.id ∈ ↑(convexHull 𝕜).toOrderHom ↑s
⊢ 0 < ∑ i in s, w i
Theorem: PrincipalIdealRing.mem_submonoid_of_factors_subset_of_units_subset
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: rcases(factors_spec a ha).2 with ⟨c, hc⟩
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ (b : R), b ∈ factors a → b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
⊢ a ∈ s

tactic: rw [← hc]
state_before: case intro
R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ (b : R), b ∈ factors a → b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
c : Rˣ
hc : Multiset.prod (factors a) * ↑c = a
⊢ a ∈ s

tactic: exact mul_mem (multiset_prod_mem _ hfac) (hunit _)
state_before: case intro
R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
s : Submonoid R
a : R
ha : a ≠ 0
hfac : ∀ (b : R), b ∈ factors a → b ∈ s
hunit : ∀ (c : Rˣ), ↑c ∈ s
c : Rˣ
hc : Multiset.prod (factors a) * ↑c = a
⊢ Multiset.prod (factors a) * ↑c ∈ s