tasksource/leandojo huggingface dataset:
Theorem: Finset.offDiag_union
File: Mathlib/Data/Finset/Prod.lean

tactic: push_cast
state_before: α : Type u_1
β : Type ?u.123926
γ : Type ?u.123929
inst✝ : DecidableEq α
s t : Finset α
x : α × α
h : _root_.Disjoint s t
⊢ ↑(offDiag (s ∪ t)) = ↑(offDiag s ∪ offDiag t ∪ s ×ˢ t ∪ t ×ˢ s)

tactic: exact Set.offDiag_union (disjoint_coe.2 h)
state_before: α : Type u_1
β : Type ?u.123926
γ : Type ?u.123929
inst✝ : DecidableEq α
s t : Finset α
x : α × α
h : _root_.Disjoint s t
⊢ Set.offDiag (↑s ∪ ↑t) = Set.offDiag ↑s ∪ Set.offDiag ↑t ∪ ↑s ×ˢ ↑t ∪ ↑t ×ˢ ↑s
Theorem: continuous_extendFrom
File: Mathlib/Topology/ExtendFrom.lean

tactic: rw [continuous_iff_continuousOn_univ]
state_before: X : Type u_2
Y : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : RegularSpace Y
f : X → Y
A : Set X
hA : Dense A
hf : ∀ (x : X), ∃ y, Tendsto f (𝓝[A] x) (𝓝 y)
⊢ Continuous (extendFrom A f)

tactic: exact continuousOn_extendFrom (fun x _ ↦ hA x) (by simpa using hf)
state_before: X : Type u_2
Y : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : RegularSpace Y
f : X → Y
A : Set X
hA : Dense A
hf : ∀ (x : X), ∃ y, Tendsto f (𝓝[A] x) (𝓝 y)
⊢ ContinuousOn (extendFrom A f) univ

tactic: simpa using hf
state_before: X : Type u_2
Y : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : RegularSpace Y
f : X → Y
A : Set X
hA : Dense A
hf : ∀ (x : X), ∃ y, Tendsto f (𝓝[A] x) (𝓝 y)
⊢ ∀ (x : X), x ∈ univ → ∃ y, Tendsto f (𝓝[A] x) (𝓝 y)
Theorem: lt_mul_left
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: convert mul_lt_mul_of_pos_right hm hn
state_before: α : Type u
β : Type ?u.61774
inst✝ : StrictOrderedSemiring α
a b c d : α
hn : 0 < a
hm : 1 < b
⊢ a < b * a

tactic: rw [one_mul]
state_before: case h.e'_3
α : Type u
β : Type ?u.61774
inst✝ : StrictOrderedSemiring α
a b c d : α
hn : 0 < a
hm : 1 < b
⊢ a = 1 * a
Theorem: iteratedDeriv_succ
File: Mathlib/Analysis/Calculus/IteratedDeriv.lean

tactic: ext x
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.134653
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x : 𝕜
⊢ iteratedDeriv (n + 1) f = deriv (iteratedDeriv n f)

tactic: rw [← iteratedDerivWithin_univ, ← iteratedDerivWithin_univ, ← derivWithin_univ]
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.134653
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDeriv (n + 1) f x = deriv (iteratedDeriv n f) x

tactic: exact iteratedDerivWithin_succ uniqueDiffWithinAt_univ
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type ?u.134653
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDerivWithin (n + 1) f univ x = derivWithin (iteratedDerivWithin n f univ) univ x
Theorem: List.kunion_kerase
File: Mathlib/Data/List/Sigma.lean

tactic: by_cases h : a = s.1 <;> simp [h, kerase_comm a s.1 l, kunion_kerase]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
s : Sigma β
tail✝ : List (Sigma β)
l : List (Sigma β)
⊢ kunion (kerase a (s :: tail✝)) (kerase a l) = kerase a (kunion (s :: tail✝) l)
Theorem: mem_residual
File: Mathlib/Topology/MetricSpace/Baire.lean

tactic: constructor
state_before: α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s : Set α
⊢ s ∈ residual α ↔ ∃ t x, IsGδ t ∧ Dense t

tactic: rintro ⟨t, ts, ho, hd⟩
state_before: case mpr
α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s : Set α
⊢ (∃ t x, IsGδ t ∧ Dense t) → s ∈ residual α

tactic: exact mem_of_superset (residual_of_dense_Gδ ho hd) ts
state_before: case mpr.intro.intro.intro
α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s t : Set α
ts : t ⊆ s
ho : IsGδ t
hd : Dense t
⊢ s ∈ residual α

tactic: rw [mem_residual_iff]
state_before: case mp
α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s : Set α
⊢ s ∈ residual α → ∃ t x, IsGδ t ∧ Dense t

tactic: rintro ⟨S, hSo, hSd, Sct, Ss⟩
state_before: case mp
α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s : Set α
⊢ (∃ S, (∀ (t : Set α), t ∈ S → IsOpen t) ∧ (∀ (t : Set α), t ∈ S → Dense t) ∧ Set.Countable S ∧ ⋂₀ S ⊆ s) →
    ∃ t x, IsGδ t ∧ Dense t

tactic: refine' ⟨_, Ss, ⟨_, fun t ht => hSo _ ht, Sct, rfl⟩, _⟩
state_before: case mp.intro.intro.intro.intro
α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s : Set α
S : Set (Set α)
hSo : ∀ (t : Set α), t ∈ S → IsOpen t
hSd : ∀ (t : Set α), t ∈ S → Dense t
Sct : Set.Countable S
Ss : ⋂₀ S ⊆ s
⊢ ∃ t x, IsGδ t ∧ Dense t

tactic: exact dense_sInter_of_open hSo Sct hSd
state_before: case mp.intro.intro.intro.intro
α : Type u_1
β : Type ?u.14520
γ : Type ?u.14523
ι : Type ?u.14526
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
s : Set α
S : Set (Set α)
hSo : ∀ (t : Set α), t ∈ S → IsOpen t
hSd : ∀ (t : Set α), t ∈ S → Dense t
Sct : Set.Countable S
Ss : ⋂₀ S ⊆ s
⊢ Dense (⋂₀ S)
Theorem: bernsteinPolynomial.eval_at_0
File: Mathlib/RingTheory/Polynomial/Bernstein.lean

tactic: rw [bernsteinPolynomial]
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
⊢ Polynomial.eval 0 (bernsteinPolynomial R n ν) = if ν = 0 then 1 else 0

tactic: split_ifs with h
state_before: R : Type u_1
inst✝ : CommRing R
n ν : ℕ
⊢ Polynomial.eval 0 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = if ν = 0 then 1 else 0

tactic: subst h
state_before: case inl
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν = 0
⊢ Polynomial.eval 0 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 1

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : CommRing R
n : ℕ
⊢ Polynomial.eval 0 (↑(choose n 0) * X ^ 0 * (1 - X) ^ (n - 0)) = 1

tactic: simp [zero_pow (Nat.pos_of_ne_zero h)]
state_before: case inr
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ¬ν = 0
⊢ Polynomial.eval 0 (↑(choose n ν) * X ^ ν * (1 - X) ^ (n - ν)) = 0
Theorem: minpoly.degree_le_of_ne_zero
File: Mathlib/FieldTheory/Minpoly/Field.lean

tactic: simp [hp]
state_before: A : Type u_1
B : Type u_2
inst✝² : Field A
inst✝¹ : Ring B
inst✝ : Algebra A B
x : B
p : A[X]
pnz : p ≠ 0
hp : ↑(Polynomial.aeval x) p = 0
⊢ ↑(Polynomial.aeval x) (p * ↑C (leadingCoeff p)⁻¹) = 0
Theorem: Set.OrdConnected.image_ennreal_ofReal
File: Mathlib/Data/Real/ENNReal.lean

tactic: simpa only [image_image] using h.image_real_toNNReal.image_coe_nnreal_ennreal
state_before: α : Type ?u.872272
β : Type ?u.872275
s : Set ℝ
t : Set ℝ≥0
u : Set ℝ≥0∞
h : OrdConnected s
⊢ OrdConnected (ENNReal.ofReal '' s)
Theorem: Subalgebra.iSupLift_comp_inclusion
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: ext
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
h : K i ≤ T
⊢ AlgHom.comp (iSupLift K dir f hf T hT) (inclusion h) = f i

tactic: simp
state_before: case H
R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
h : K i ≤ T
x✝ : { x // x ∈ K i }
⊢ ↑(AlgHom.comp (iSupLift K dir f hf T hT) (inclusion h)) x✝ = ↑(f i) x✝
Theorem: Set.image_subset_range
File: Mathlib/Data/Set/Image.lean

tactic: rw [← image_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.70476
ι : Sort ?u.70479
ι' : Sort ?u.70482
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
⊢ f '' s ⊆ range f

tactic: exact image_subset _ (subset_univ _)
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.70476
ι : Sort ?u.70479
ι' : Sort ?u.70482
f✝ : ι → α
s✝ t : Set α
f : α → β
s : Set α
⊢ f '' s ⊆ f '' univ
Theorem: Nat.even_sub
File: Mathlib/Data/Nat/Parity.lean

tactic: conv_rhs => rw [← tsub_add_cancel_of_le h, even_add]
state_before: m n : ℕ
h : n ≤ m
⊢ Even (m - n) ↔ (Even m ↔ Even n)

tactic: by_cases h : Even n <;> simp [h]
state_before: m n : ℕ
h : n ≤ m
⊢ Even (m - n) ↔ ((Even (m - n) ↔ Even n) ↔ Even n)
Theorem: bound'
File: Mathlib/NumberTheory/Padics/Hensel.lean

tactic: rw [← MulZeroClass.mul_zero ‖F.derivative.eval a‖]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
hnsol : Polynomial.eval a F ≠ 0
⊢ Tendsto (fun n => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) atTop (𝓝 0)

tactic: exact
  tendsto_const_nhds.mul
    (Tendsto.comp (tendsto_pow_atTop_nhds_0_of_lt_1 (norm_nonneg _) (T_lt_one hnorm))
      (Nat.tendsto_pow_atTop_atTop_of_one_lt (by norm_num)))
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
hnsol : Polynomial.eval a F ≠ 0
⊢ Tendsto (fun n => ‖Polynomial.eval a (↑Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) atTop
    (𝓝 (‖Polynomial.eval a (↑Polynomial.derivative F)‖ * 0))

tactic: norm_num
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
F : Polynomial ℤ_[p]
a : ℤ_[p]
hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (↑Polynomial.derivative F)‖ ^ 2
hnsol : Polynomial.eval a F ≠ 0
⊢ 1 < 2
Theorem: List.enumFrom_eq_enumFromTR
File: Std/Data/List/Basic.lean

tactic: funext α n l
state_before: ⊢ @enumFrom = @enumFromTR

tactic: simp [enumFromTR, -Array.size_toArray]
state_before: case h.h.h
α : Type u_1
n : Nat
l : List α
⊢ enumFrom n l = enumFromTR n l

tactic: let f := fun (a : α) (n, acc) => (n-1, (n-1, a) :: acc)
state_before: case h.h.h
α : Type u_1
n : Nat
l : List α
⊢ enumFrom n l =
    (Array.foldr (fun a x => (x.fst - 1, (x.fst - 1, a) :: x.snd)) (n + Array.size (toArray l), []) (toArray l)
        (Array.size (toArray l))).snd

tactic: let rec go : ∀ l n, l.foldr f (n + l.length, []) = (n, enumFrom n l)
  | [], n => rfl
  | a::as, n => by
    rw [← show _ + as.length = n + (a::as).length from Nat.succ_add .., foldr, go as]; simp; rfl
state_before: case h.h.h
α : Type u_1
n : Nat
l : List α
f : α → Nat × List (Nat × α) → Nat × List (Nat × α) :=
  fun a x =>
    match x with
    | (n, acc) => (n - 1, (n - 1, a) :: acc)
⊢ enumFrom n l =
    (Array.foldr (fun a x => (x.fst - 1, (x.fst - 1, a) :: x.snd)) (n + Array.size (toArray l), []) (toArray l)
        (Array.size (toArray l))).snd

tactic: rw [Array.foldr_eq_foldr_data]
state_before: case h.h.h
α : Type u_1
n : Nat
l : List α
f : α → Nat × List (Nat × α) → Nat × List (Nat × α) :=
  fun a x =>
    match x with
    | (n, acc) => (n - 1, (n - 1, a) :: acc)
⊢ enumFrom n l =
    (Array.foldr (fun a x => (x.fst - 1, (x.fst - 1, a) :: x.snd)) (n + Array.size (toArray l), []) (toArray l)
        (Array.size (toArray l))).snd

tactic: simp [go]
state_before: case h.h.h
α : Type u_1
n : Nat
l : List α
f : α → Nat × List (Nat × α) → Nat × List (Nat × α) :=
  fun a x =>
    match x with
    | (n, acc) => (n - 1, (n - 1, a) :: acc)
⊢ enumFrom n l =
    (foldr (fun a x => (x.fst - 1, (x.fst - 1, a) :: x.snd)) (n + Array.size (toArray l), []) (toArray l).data).snd

tactic: rw [← show _ + as.length = n + (a::as).length from Nat.succ_add .., foldr, go as]
state_before: α : Type u_1
n✝ : Nat
l : List α
f : α → Nat × List (Nat × α) → Nat × List (Nat × α) :=
  fun a x =>
    match x with
    | (n, acc) => (n - 1, (n - 1, a) :: acc)
a : α
as : List α
n : Nat
⊢ foldr f (n + length (a :: as), []) (a :: as) = (n, enumFrom n (a :: as))

tactic: simp
state_before: α : Type u_1
n✝ : Nat
l : List α
f : α → Nat × List (Nat × α) → Nat × List (Nat × α) :=
  fun a x =>
    match x with
    | (n, acc) => (n - 1, (n - 1, a) :: acc)
a : α
as : List α
n : Nat
⊢ f a (Nat.succ n, enumFrom (Nat.succ n) as) = (n, enumFrom n (a :: as))

tactic: rfl
state_before: α : Type u_1
n✝ : Nat
l : List α
f : α → Nat × List (Nat × α) → Nat × List (Nat × α) :=
  fun a x =>
    match x with
    | (n, acc) => (n - 1, (n - 1, a) :: acc)
a : α
as : List α
n : Nat
⊢ Nat.succ n - 1 = n
Theorem: Pmf.pure_bind
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: have : ∀ b a', ite (a' = a) (f a' b) 0 = ite (a' = a) (f a b) 0 := fun b a' => by
  split_ifs with h <;> simp; subst h; simp
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.56970
p : Pmf α
f✝ : α → Pmf β
g : β → Pmf γ
a : α
f : α → Pmf β
⊢ bind (pure a) f = f a

tactic: ext b
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.56970
p : Pmf α
f✝ : α → Pmf β
g : β → Pmf γ
a : α
f : α → Pmf β
this : ∀ (b : β) (a' : α), (if a' = a then ↑(f a') b else 0) = if a' = a then ↑(f a) b else 0
⊢ bind (pure a) f = f a

tactic: simp [this]
state_before: case h
α : Type u_2
β : Type u_1
γ : Type ?u.56970
p : Pmf α
f✝ : α → Pmf β
g : β → Pmf γ
a : α
f : α → Pmf β
this : ∀ (b : β) (a' : α), (if a' = a then ↑(f a') b else 0) = if a' = a then ↑(f a) b else 0
b : β
⊢ ↑(bind (pure a) f) b = ↑(f a) b

tactic: split_ifs with h <;> simp
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.56970
p : Pmf α
f✝ : α → Pmf β
g : β → Pmf γ
a : α
f : α → Pmf β
b : β
a' : α
⊢ (if a' = a then ↑(f a') b else 0) = if a' = a then ↑(f a) b else 0

tactic: subst h
state_before: case inl
α : Type u_2
β : Type u_1
γ : Type ?u.56970
p : Pmf α
f✝ : α → Pmf β
g : β → Pmf γ
a : α
f : α → Pmf β
b : β
a' : α
h : a' = a
⊢ ↑(f a') b = ↑(f a) b

tactic: simp
state_before: case inl
α : Type u_2
β : Type u_1
γ : Type ?u.56970
p : Pmf α
f✝ : α → Pmf β
g : β → Pmf γ
f : α → Pmf β
b : β
a' : α
⊢ ↑(f a') b = ↑(f a') b
Theorem: Matrix.adjugate_smul
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: rw [adjugate, adjugate, transpose_smul, cramer_smul]
state_before: m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
r : α
A : Matrix n n α
⊢ adjugate (r • A) = r ^ (Fintype.card n - 1) • adjugate A

tactic: rfl
state_before: m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
r : α
A : Matrix n n α
⊢ (↑of fun i => ↑(r ^ (Fintype.card n - 1) • cramer Aᵀ) (Pi.single i 1)) =
    r ^ (Fintype.card n - 1) • ↑of fun i => ↑(cramer Aᵀ) (Pi.single i 1)
Theorem: Metric.cthickening_singleton
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: ext y
state_before: ι : Sort ?u.105056
α✝ : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α✝
δ✝ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
x : α
δ : ℝ
hδ : 0 ≤ δ
⊢ cthickening δ {x} = closedBall x δ

tactic: simp [cthickening, edist_dist, ENNReal.ofReal_le_ofReal_iff hδ]
state_before: case h
ι : Sort ?u.105056
α✝ : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α✝
δ✝ ε : ℝ
s t : Set α✝
x✝ : α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
x : α
δ : ℝ
hδ : 0 ≤ δ
y : α
⊢ y ∈ cthickening δ {x} ↔ y ∈ closedBall x δ
Theorem: Monotone.tendsto_indicator
File: Mathlib/Order/Filter/IndicatorFunction.lean

tactic: by_cases h : ∃ i, a ∈ s i
state_before: α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
⊢ Tendsto (fun i => indicator (s i) f a) atTop (pure (indicator (⋃ (i : ι), s i) f a))

tactic: rcases h with ⟨i, hi⟩
state_before: case pos
α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
h : ∃ i, a ∈ s i
⊢ Tendsto (fun i => indicator (s i) f a) atTop (pure (indicator (⋃ (i : ι), s i) f a))

tactic: refine' tendsto_pure.2 ((eventually_ge_atTop i).mono fun n hn => _)
state_before: case pos.intro
α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
i : ι
hi : a ∈ s i
⊢ Tendsto (fun i => indicator (s i) f a) atTop (pure (indicator (⋃ (i : ι), s i) f a))

tactic: rw [indicator_of_mem (hs hn hi) _, indicator_of_mem ((subset_iUnion _ _) hi) _]
state_before: case pos.intro
α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
i : ι
hi : a ∈ s i
n : ι
hn : i ≤ n
⊢ indicator (s n) f a = indicator (⋃ (i : ι), s i) f a

tactic: have h' : a ∉ ⋃ i, s i := mt mem_iUnion.1 h
state_before: case neg
α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
h : ¬∃ i, a ∈ s i
⊢ Tendsto (fun i => indicator (s i) f a) atTop (pure (indicator (⋃ (i : ι), s i) f a))

tactic: rw [not_exists] at h
state_before: case neg
α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
h : ¬∃ i, a ∈ s i
h' : ¬a ∈ ⋃ (i : ι), s i
⊢ Tendsto (fun i => indicator (s i) f a) atTop (pure (indicator (⋃ (i : ι), s i) f a))

tactic: simpa only [indicator_of_not_mem, *] using tendsto_const_pure
state_before: case neg
α : Type u_3
β : Type u_2
M : Type ?u.3017
E : Type ?u.3020
ι : Type u_1
inst✝¹ : Preorder ι
inst✝ : Zero β
s : ι → Set α
hs : Monotone s
f : α → β
a : α
h : ∀ (x : ι), ¬a ∈ s x
h' : ¬a ∈ ⋃ (i : ι), s i
⊢ Tendsto (fun i => indicator (s i) f a) atTop (pure (indicator (⋃ (i : ι), s i) f a))
Theorem: MulAction.orbitRel.Quotient.orbit_eq_orbit_out
File: Mathlib/GroupTheory/GroupAction/Basic.lean

tactic: conv_lhs => rw [← hφ x]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : Group α
inst✝ : MulAction α β
x : Quotient α β
φ : Quotient α β → β
hφ : Function.RightInverse φ Quotient.mk'
⊢ orbit x = MulAction.orbit α (φ x)
Theorem: GeneralizedContinuedFraction.squashGCF_eq_self_of_terminated
File: Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean

tactic: cases n
state_before: K : Type u_1
n : ℕ
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
terminated_at_n : TerminatedAt g n
⊢ squashGCF g n = g

tactic: case zero =>
  change g.s.get? 0 = none at terminated_at_n
  simp only [convergents', squashGCF, convergents'Aux, terminated_at_n]
state_before: case zero
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
terminated_at_n : TerminatedAt g Nat.zero
⊢ squashGCF g Nat.zero = g

case succ
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
terminated_at_n : TerminatedAt g (Nat.succ n✝)
⊢ squashGCF g (Nat.succ n✝) = g

tactic: case succ =>
  cases g
  simp only [squashGCF, mk.injEq, true_and]
  exact squashSeq_eq_self_of_terminated terminated_at_n
state_before: case succ
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
terminated_at_n : TerminatedAt g (Nat.succ n✝)
⊢ squashGCF g (Nat.succ n✝) = g

tactic: change g.s.get? 0 = none at terminated_at_n
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
terminated_at_n : TerminatedAt g Nat.zero
⊢ squashGCF g Nat.zero = g

tactic: simp only [convergents', squashGCF, convergents'Aux, terminated_at_n]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
terminated_at_n : Stream'.Seq.get? g.s 0 = none
⊢ squashGCF g Nat.zero = g

tactic: cases g
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
terminated_at_n : TerminatedAt g (Nat.succ n✝)
⊢ squashGCF g (Nat.succ n✝) = g

tactic: simp only [squashGCF, mk.injEq, true_and]
state_before: case mk
K : Type u_1
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
h✝ : K
s✝ : Stream'.Seq (Pair K)
terminated_at_n : TerminatedAt { h := h✝, s := s✝ } (Nat.succ n✝)
⊢ squashGCF { h := h✝, s := s✝ } (Nat.succ n✝) = { h := h✝, s := s✝ }

tactic: exact squashSeq_eq_self_of_terminated terminated_at_n
state_before: case mk
K : Type u_1
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
h✝ : K
s✝ : Stream'.Seq (Pair K)
terminated_at_n : TerminatedAt { h := h✝, s := s✝ } (Nat.succ n✝)
⊢ squashSeq s✝ n✝ = s✝
Theorem: Submodule.mkQ_map_self
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: rw [eq_bot_iff, map_le_iff_le_comap, comap_bot, ker_mkQ]
state_before: R : Type u_2
M : Type u_1
r : R
x y : M
inst✝⁵ : Ring R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
p p' : Submodule R M
R₂ : Type ?u.231258
M₂ : Type ?u.231261
inst✝² : Ring R₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R₂ M₂
τ₁₂ : R →+* R₂
⊢ map (mkQ p) p = ⊥
Theorem: MeasureTheory.Measure.haar.prehaar_nonneg
File: Mathlib/MeasureTheory/Measure/Haar/Basic.lean

tactic: apply div_nonneg <;> norm_cast <;> apply zero_le
state_before: G : Type u_1
inst✝¹ : Group G
inst✝ : TopologicalSpace G
K₀ : PositiveCompacts G
U : Set G
K : Compacts G
⊢ 0 ≤ prehaar (↑K₀) U K
Theorem: SimpleGraph.Subgraph.singletonSubgraph_eq_induce
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext <;> simp (config := { contextual := true }) [-Set.bot_eq_empty, Prop.bot_eq_false]
state_before: ι : Sort ?u.261642
V : Type u
W : Type v
G : SimpleGraph V
G' G'' : Subgraph G
s s' : Set V
v : V
⊢ SimpleGraph.singletonSubgraph G v = induce ⊤ {v}
Theorem: TensorAlgebra.ι_ne_one
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

tactic: rw [← (algebraMap R (TensorAlgebra R M)).map_one, Ne.def, ι_eq_algebraMap_iff]
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
x : M
⊢ ↑(ι R) x ≠ 1

tactic: exact one_ne_zero ∘ And.right
state_before: R : Type u_1
inst✝³ : CommSemiring R
M : Type u_2
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
x : M
⊢ ¬(x = 0 ∧ 1 = 0)
Theorem: Ordering.orElse_eq_lt
File: Mathlib/Order/Compare.lean

tactic: cases o₁ <;> cases o₂ <;> exact by decide
state_before: α : Type ?u.10115
β : Type ?u.10118
o₁ o₂ : Ordering
⊢ orElse o₁ o₂ = lt ↔ o₁ = lt ∨ o₁ = eq ∧ o₂ = lt

tactic: decide
state_before: α : Type ?u.10115
β : Type ?u.10118
⊢ orElse gt gt = lt ↔ gt = lt ∨ gt = eq ∧ gt = lt