tasksource/leandojo huggingface dataset:
Theorem: coprime_sq_sub_mul
File: Mathlib/NumberTheory/PythagoreanTriples.lean

tactic: cases' hmn with h1 h2
state_before: m n : ℤ
h : Int.gcd m n = 1
hmn : m % 2 = 0 ∧ n % 2 = 1 ∨ m % 2 = 1 ∧ n % 2 = 0
⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1

tactic: exact coprime_sq_sub_mul_of_even_odd h h1.left h1.right
state_before: case inl
m n : ℤ
h : Int.gcd m n = 1
h1 : m % 2 = 0 ∧ n % 2 = 1
⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1

tactic: exact coprime_sq_sub_mul_of_odd_even h h2.left h2.right
state_before: case inr
m n : ℤ
h : Int.gcd m n = 1
h2 : m % 2 = 1 ∧ n % 2 = 0
⊢ Int.gcd (m ^ 2 - n ^ 2) (2 * m * n) = 1
Theorem: MeasureTheory.VectorMeasure.restrict_le_restrict_of_subset_le
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: by_cases hi : MeasurableSet i
state_before: α : Type u_1
β : Type ?u.544674
m : MeasurableSpace α
M : Type u_2
inst✝² : TopologicalSpace M
inst✝¹ : AddCommMonoid M
inst✝ : PartialOrder M
v w : VectorMeasure α M
i : Set α
h : ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j
⊢ restrict v i ≤ restrict w i

tactic: exact (restrict_le_restrict_iff _ _ hi).2 h
state_before: case pos
α : Type u_1
β : Type ?u.544674
m : MeasurableSpace α
M : Type u_2
inst✝² : TopologicalSpace M
inst✝¹ : AddCommMonoid M
inst✝ : PartialOrder M
v w : VectorMeasure α M
i : Set α
h : ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j
hi : MeasurableSet i
⊢ restrict v i ≤ restrict w i

tactic: rw [restrict_not_measurable v hi, restrict_not_measurable w hi]
state_before: case neg
α : Type u_1
β : Type ?u.544674
m : MeasurableSpace α
M : Type u_2
inst✝² : TopologicalSpace M
inst✝¹ : AddCommMonoid M
inst✝ : PartialOrder M
v w : VectorMeasure α M
i : Set α
h : ∀ ⦃j : Set α⦄, MeasurableSet j → j ⊆ i → ↑v j ≤ ↑w j
hi : ¬MeasurableSet i
⊢ restrict v i ≤ restrict w i
Theorem: List.foldlIdx_eq_foldlIdxSpec
File: Mathlib/Data/List/Indexes.lean

tactic: induction bs generalizing start a
state_before: α : Type u
β : Type v
f : ℕ → α → β → α
a : α
bs : List β
start : ℕ
⊢ foldlIdx f a bs start = foldlIdxSpec f a bs start

tactic: rfl
state_before: case nil
α : Type u
β : Type v
f : ℕ → α → β → α
a : α
start : ℕ
⊢ foldlIdx f a [] start = foldlIdxSpec f a [] start

tactic: simp [foldlIdxSpec, *]
state_before: case cons
α : Type u
β : Type v
f : ℕ → α → β → α
head✝ : β
tail✝ : List β
tail_ih✝ : ∀ (a : α) (start : ℕ), foldlIdx f a tail✝ start = foldlIdxSpec f a tail✝ start
a : α
start : ℕ
⊢ foldlIdx f a (head✝ :: tail✝) start = foldlIdxSpec f a (head✝ :: tail✝) start
Theorem: CategoryTheory.Free.single_comp_single
File: Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean

tactic: dsimp [CategoryTheory.categoryFree]
state_before: R : Type u_1
inst✝¹ : CommRing R
C : Type u
inst✝ : Category C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
r s : R
⊢ single f r ≫ single g s = single (f ≫ g) (r * s)

tactic: simp
state_before: R : Type u_1
inst✝¹ : CommRing R
C : Type u
inst✝ : Category C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
r s : R
⊢ (sum (single f r) fun f' s_1 => sum (single g s) fun g' t => single (f' ≫ g') (s_1 * t)) = single (f ≫ g) (r * s)
Theorem: Filter.tendsto_Ioi_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [atTop_Ioi_eq, tendsto_comap_iff]
state_before: ι : Type ?u.333628
ι' : Type ?u.333631
α : Type u_1
β : Type u_2
γ : Type ?u.333640
inst✝ : SemilatticeSup α
a : α
f : β → ↑(Ioi a)
l : Filter β
⊢ Tendsto f l atTop ↔ Tendsto (fun x => ↑(f x)) l atTop

tactic: rfl
state_before: ι : Type ?u.333628
ι' : Type ?u.333631
α : Type u_1
β : Type u_2
γ : Type ?u.333640
inst✝ : SemilatticeSup α
a : α
f : β → ↑(Ioi a)
l : Filter β
⊢ Tendsto (Subtype.val ∘ f) l atTop ↔ Tendsto (fun x => ↑(f x)) l atTop
Theorem: Ioo_ofDual
File: Mathlib/Order/LocallyFinite.lean

tactic: refine' Eq.trans _ map_refl.symm
state_before: α : Type u_1
β : Type ?u.115891
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ioo (↑ofDual a) (↑ofDual b) = map (Equiv.toEmbedding ofDual) (Ioo b a)

tactic: ext c
state_before: α : Type u_1
β : Type ?u.115891
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
⊢ Ioo (↑ofDual a) (↑ofDual b) = Ioo b a

tactic: rw [mem_Ioo, mem_Ioo (α := αᵒᵈ)]
state_before: case a
α : Type u_1
β : Type ?u.115891
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : (fun x => α) a
⊢ c ∈ Ioo (↑ofDual a) (↑ofDual b) ↔ c ∈ Ioo b a

tactic: exact and_comm
state_before: case a
α : Type u_1
β : Type ?u.115891
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : LocallyFiniteOrder α
a✝ b✝ : α
a b : αᵒᵈ
c : (fun x => α) a
⊢ ↑ofDual a < c ∧ c < ↑ofDual b ↔ b < c ∧ c < a
Theorem: ManyOneDegree.le_refl
File: Mathlib/Computability/Reduce.lean

tactic: induction d using ManyOneDegree.ind_on
state_before: α : Type u
inst✝⁵ : Primcodable α
inst✝⁴ : Inhabited α
β : Type v
inst✝³ : Primcodable β
inst✝² : Inhabited β
γ : Type w
inst✝¹ : Primcodable γ
inst✝ : Inhabited γ
d : ManyOneDegree
⊢ d ≤ d

tactic: simp
state_before: case h
α : Type u
inst✝⁵ : Primcodable α
inst✝⁴ : Inhabited α
β : Type v
inst✝³ : Primcodable β
inst✝² : Inhabited β
γ : Type w
inst✝¹ : Primcodable γ
inst✝ : Inhabited γ
p✝ : Set ℕ
⊢ of p✝ ≤ of p✝

tactic: rfl
state_before: case h
α : Type u
inst✝⁵ : Primcodable α
inst✝⁴ : Inhabited α
β : Type v
inst✝³ : Primcodable β
inst✝² : Inhabited β
γ : Type w
inst✝¹ : Primcodable γ
inst✝ : Inhabited γ
p✝ : Set ℕ
⊢ p✝ ≤₀ p✝
Theorem: Complex.sin_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← ofReal_sin, Real.sin_pi]
state_before: ⊢ sin ↑π = 0

tactic: simp
state_before: ⊢ ↑0 = 0
Theorem: Con.sSup_def
File: Mathlib/GroupTheory/Congruence.lean

tactic: rw [sSup_eq_conGen, sSup_image]
state_before: M : Type u_1
N : Type ?u.30817
P : Type ?u.30820
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c : Con M
S : Set (Con M)
⊢ sSup S = conGen (sSup (FunLike.coe '' S))

tactic: congr with (x y)
state_before: M : Type u_1
N : Type ?u.30817
P : Type ?u.30820
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c : Con M
S : Set (Con M)
⊢ (conGen fun x y => ∃ c, c ∈ S ∧ ↑c x y) = conGen (⨆ (a : Con M) (_ : a ∈ S), ↑a)

tactic: simp only [sSup_image, iSup_apply, iSup_Prop_eq, exists_prop, rel_eq_coe]
state_before: case e_r.h.h.a
M : Type u_1
N : Type ?u.30817
P : Type ?u.30820
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c : Con M
S : Set (Con M)
x y : M
⊢ (∃ c, c ∈ S ∧ ↑c x y) ↔ iSup (fun a => ⨆ (_ : a ∈ S), ↑a) x y
Theorem: CategoryTheory.CosimplicialObject.δ_comp_σ_self'
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

tactic: subst H
state_before: C : Type u
inst✝ : Category C
X : CosimplicialObject C
n : ℕ
j : Fin (n + 2)
i : Fin (n + 1)
H : j = ↑Fin.castSucc i
⊢ δ X j ≫ σ X i = 𝟙 (X.obj [n])

tactic: rw [δ_comp_σ_self]
state_before: C : Type u
inst✝ : Category C
X : CosimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ δ X (↑Fin.castSucc i) ≫ σ X i = 𝟙 (X.obj [n])
Theorem: List.rdropWhile_singleton
File: Mathlib/Data/List/Rdrop.lean

tactic: rw [← nil_append [x], rdropWhile_concat, rdropWhile_nil]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rdropWhile p [x] = if p x = true then [] else [x]
Theorem: Subtype.preimage_coe_inter_self
File: Mathlib/Data/Set/Image.lean

tactic: rw [preimage_coe_eq_preimage_coe_iff, inter_assoc, inter_self]
state_before: α : Type u_1
s t : Set α
⊢ val ⁻¹' (t ∩ s) = val ⁻¹' t
Theorem: Cardinal.lift_mk_fin
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simp
state_before: α β : Type u
n : ℕ
⊢ lift (#Fin n) = ↑n
Theorem: Stream'.Seq.ofStream_cons
File: Mathlib/Data/Seq/Seq.lean

tactic: apply Subtype.eq
state_before: α : Type u
β : Type v
γ : Type w
a : α
s : Stream' α
⊢ ↑(a :: s) = cons a ↑s

tactic: simp [ofStream, cons]
state_before: case a
α : Type u
β : Type v
γ : Type w
a : α
s : Stream' α
⊢ ↑↑(a :: s) = ↑(cons a ↑s)

tactic: rw [Stream'.map_cons]
state_before: case a
α : Type u
β : Type v
γ : Type w
a : α
s : Stream' α
⊢ Stream'.map some (a :: s) = some a :: Stream'.map some s
Theorem: ZMod.χ₄_int_mod_four
File: Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean

tactic: rw [← ZMod.int_cast_mod n 4]
state_before: n : ℤ
⊢ ↑χ₄ ↑n = ↑χ₄ ↑(n % 4)

tactic: norm_cast
state_before: n : ℤ
⊢ ↑χ₄ ↑(n % ↑4) = ↑χ₄ ↑(n % 4)
Theorem: FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: have := ((TFAE_exists_lt_isLittleO_pow (fun n => ‖p n‖ * (r : ℝ) ^ n) 1).out 1 5).mp
  (p.isLittleO_of_lt_radius h)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.141980
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
r : ℝ≥0
h : ↑r < radius p
⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n

tactic: rcases this with ⟨a, ha, C, hC, H⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.141980
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
r : ℝ≥0
h : ↑r < radius p
this : ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), abs (‖p n‖ * ↑r ^ n) ≤ C * a ^ n
⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n

tactic: exact ⟨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)⟩
state_before: case intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.141980
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
p : FormalMultilinearSeries 𝕜 E F
r : ℝ≥0
h : ↑r < radius p
a : ℝ
ha : a ∈ Ioo 0 1
C : ℝ
hC : C > 0
H : ∀ (n : ℕ), abs (‖p n‖ * ↑r ^ n) ≤ C * a ^ n
⊢ ∃ a, a ∈ Ioo 0 1 ∧ ∃ C, C > 0 ∧ ∀ (n : ℕ), ‖p n‖ * ↑r ^ n ≤ C * a ^ n
Theorem: FirstOrder.Language.Substructure.closure_induction'
File: Mathlib/ModelTheory/Substructures.lean

tactic: refine' Exists.elim _ fun (hx : x ∈ closure L s) (hc : p x hx) => hc
state_before: L : Language
M : Type w
N : Type ?u.648999
P : Type ?u.649002
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
s✝ s : Set M
p : (x : M) → x ∈ LowerAdjoint.toFun (closure L) s → Prop
Hs : ∀ (x : M) (h : x ∈ s), p x (_ : x ∈ ↑(LowerAdjoint.toFun (closure L) s))
Hfun : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f {x | ∃ hx, p x hx}
x : M
hx : x ∈ LowerAdjoint.toFun (closure L) s
⊢ p x hx

tactic: exact closure_induction hx (fun x hx => ⟨subset_closure hx, Hs x hx⟩) @Hfun
state_before: L : Language
M : Type w
N : Type ?u.648999
P : Type ?u.649002
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
s✝ s : Set M
p : (x : M) → x ∈ LowerAdjoint.toFun (closure L) s → Prop
Hs : ∀ (x : M) (h : x ∈ s), p x (_ : x ∈ ↑(LowerAdjoint.toFun (closure L) s))
Hfun : ∀ {n : ℕ} (f : Functions L n), ClosedUnder f {x | ∃ hx, p x hx}
x : M
hx : x ∈ LowerAdjoint.toFun (closure L) s
⊢ ∃ x_1, p x x_1
Theorem: Metric.Bounded.right_of_prod
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: simpa only [snd_image_prod hs t] using (@LipschitzWith.prod_snd α β _ _).bounded_image h
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s : Set α
t : Set β
h : Bounded (s ×ˢ t)
hs : Set.Nonempty s
⊢ Bounded t
Theorem: LieSubalgebra.eq_bot_iff
File: Mathlib/Algebra/Lie/Subalgebra.lean

tactic: rw [_root_.eq_bot_iff]
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
⊢ K = ⊥ ↔ ∀ (x : L), x ∈ K → x = 0

tactic: exact Iff.rfl
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
⊢ K ≤ ⊥ ↔ ∀ (x : L), x ∈ K → x = 0
Theorem: Rat.neg_normalize
File: Std/Data/Rat/Lemmas.lean

tactic: simp [normalize, maybeNormalize_eq]
state_before: n : Int
d : Nat
z : d ≠ 0
⊢ -normalize n d = normalize (-n) d

tactic: ext <;> simp [Int.neg_div]
state_before: n : Int
d : Nat
z : d ≠ 0
⊢ -mk' (Int.div n ↑(Nat.gcd (Int.natAbs n) d)) (d / Nat.gcd (Int.natAbs n) d) =
    mk' (-Int.div n ↑(Nat.gcd (Int.natAbs n) d)) (d / Nat.gcd (Int.natAbs n) d)
Theorem: Subgroup.relindex_bot_left
File: Mathlib/GroupTheory/Index.lean

tactic: rw [relindex, bot_subgroupOf, index_bot]
state_before: G : Type u_1
inst✝ : Group G
H K L : Subgroup G
⊢ relindex ⊥ H = Nat.card { x // x ∈ H }
Theorem: Set.insert_diff_of_mem
File: Mathlib/Data/Set/Basic.lean

tactic: ext
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
h : a ∈ t
⊢ insert a s \ t = s \ t

tactic: constructor <;> simp (config := { contextual := true }) [or_imp, h]
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
h : a ∈ t
x✝ : α
⊢ x✝ ∈ insert a s \ t ↔ x✝ ∈ s \ t
Theorem: Ordinal.opow_one_add
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rw [opow_add, opow_one]
state_before: a b : Ordinal
⊢ a ^ (1 + b) = a * a ^ b
Theorem: Computation.map_think
File: Mathlib/Data/Seq/Computation.lean

tactic: apply Subtype.eq
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ map f (think { val := s, property := al }) = think (map f { val := s, property := al })

tactic: dsimp [think, map]
state_before: case a
α : Type u
β : Type v
γ : Type w
f : α → β
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ ↑(map f (think { val := s, property := al })) = ↑(think (map f { val := s, property := al }))

tactic: rw [Stream'.map_cons]
state_before: case a
α : Type u
β : Type v
γ : Type w
f : α → β
s : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a
⊢ Stream'.map (fun o => Option.rec none (fun val => some (f val)) o) (Stream'.cons none s) =
    Stream'.cons none (Stream'.map (fun o => Option.rec none (fun val => some (f val)) o) s)
Theorem: map_fst_nhdsWithin
File: Mathlib/Topology/Constructions.lean

tactic: refine' le_antisymm (continuousAt_fst.mono_left inf_le_left) fun s hs => _
state_before: α : Type u
β : Type v
γ : Type ?u.52987
δ : Type ?u.52990
ε : Type ?u.52993
ζ : Type ?u.52996
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
x : α × β
⊢ map Prod.fst (𝓝[Prod.snd ⁻¹' {x.snd}] x) = 𝓝 x.fst

tactic: rcases x with ⟨x, y⟩
state_before: α : Type u
β : Type v
γ : Type ?u.52987
δ : Type ?u.52990
ε : Type ?u.52993
ζ : Type ?u.52996
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
x : α × β
s : Set α
hs : s ∈ map Prod.fst (𝓝[Prod.snd ⁻¹' {x.snd}] x)
⊢ s ∈ 𝓝 x.fst

tactic: rw [mem_map, nhdsWithin, mem_inf_principal, mem_nhds_prod_iff] at hs
state_before: case mk
α : Type u
β : Type v
γ : Type ?u.52987
δ : Type ?u.52990
ε : Type ?u.52993
ζ : Type ?u.52996
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set α
x : α
y : β
hs : s ∈ map Prod.fst (𝓝[Prod.snd ⁻¹' {(x, y).snd}] (x, y))
⊢ s ∈ 𝓝 (x, y).fst

tactic: rcases hs with ⟨u, hu, v, hv, H⟩
state_before: case mk
α : Type u
β : Type v
γ : Type ?u.52987
δ : Type ?u.52990
ε : Type ?u.52993
ζ : Type ?u.52996
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set α
x : α
y : β
hs : ∃ u, u ∈ 𝓝 x ∧ ∃ v, v ∈ 𝓝 y ∧ u ×ˢ v ⊆ {x_1 | x_1 ∈ Prod.snd ⁻¹' {(x, y).snd} → x_1 ∈ Prod.fst ⁻¹' s}
⊢ s ∈ 𝓝 (x, y).fst

tactic: simp only [prod_subset_iff, mem_singleton_iff, mem_setOf_eq, mem_preimage] at H
state_before: case mk.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type ?u.52987
δ : Type ?u.52990
ε : Type ?u.52993
ζ : Type ?u.52996
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set α
x : α
y : β
u : Set α
hu : u ∈ 𝓝 x
v : Set β
hv : v ∈ 𝓝 y
H : u ×ˢ v ⊆ {x_1 | x_1 ∈ Prod.snd ⁻¹' {(x, y).snd} → x_1 ∈ Prod.fst ⁻¹' s}
⊢ s ∈ 𝓝 (x, y).fst

tactic: exact mem_of_superset hu fun z hz => H _ hz _ (mem_of_mem_nhds hv) rfl
state_before: case mk.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type ?u.52987
δ : Type ?u.52990
ε : Type ?u.52993
ζ : Type ?u.52996
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : TopologicalSpace γ
inst✝² : TopologicalSpace δ
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set α
x : α
y : β
u : Set α
hu : u ∈ 𝓝 x
v : Set β
hv : v ∈ 𝓝 y
H : ∀ (x : α), x ∈ u → ∀ (y_1 : β), y_1 ∈ v → y_1 = y → x ∈ s
⊢ s ∈ 𝓝 (x, y).fst
Theorem: List.length_range
File: Std/Data/List/Lemmas.lean

tactic: simp only [range_eq_range', length_range']
state_before: n : Nat
⊢ length (range n) = n
Theorem: FermatPsp.coprime_of_fermatPsp
File: Mathlib/NumberTheory/FermatPsp.lean

tactic: rcases h with ⟨hp, _, hn₂⟩
state_before: n b : ℕ
h : FermatPsp n b
h₁ : 1 ≤ b
⊢ Nat.coprime n b

tactic: exact coprime_of_probablePrime hp (by linarith) h₁
state_before: case intro.intro
n b : ℕ
h₁ : 1 ≤ b
hp : ProbablePrime n b
left✝ : ¬Nat.Prime n
hn₂ : 1 < n
⊢ Nat.coprime n b

tactic: linarith
state_before: n b : ℕ
h₁ : 1 ≤ b
hp : ProbablePrime n b
left✝ : ¬Nat.Prime n
hn₂ : 1 < n
⊢ 1 ≤ n
Theorem: Filter.tendsto_atTop_embedding
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [← comap_embedding_atTop hm hu, tendsto_comap_iff]
state_before: ι : Type ?u.266753
ι' : Type ?u.266756
α : Type u_3
β : Type u_1
γ : Type u_2
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β
e : β → γ
l : Filter α
hm : ∀ (b₁ b₂ : β), e b₁ ≤ e b₂ ↔ b₁ ≤ b₂
hu : ∀ (c : γ), ∃ b, c ≤ e b
⊢ Tendsto (e ∘ f) l atTop ↔ Tendsto f l atTop
Theorem: Ordinal.type_def'
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: cases w
state_before: α : Type ?u.23052
β : Type ?u.23055
γ : Type ?u.23058
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
w : WellOrder
⊢ Quotient.mk isEquivalent w = type w.r

tactic: rfl
state_before: case mk
α : Type ?u.23052
β : Type ?u.23055
γ : Type ?u.23058
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
α✝ : Type u_1
r✝ : α✝ → α✝ → Prop
wo✝ : IsWellOrder α✝ r✝
⊢ Quotient.mk isEquivalent { α := α✝, r := r✝, wo := wo✝ } = type { α := α✝, r := r✝, wo := wo✝ }.r
Theorem: coplanar_of_finrank_eq_two
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: have : FiniteDimensional k V := finiteDimensional_of_finrank_eq_succ h
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
h : finrank k V = 2
⊢ Coplanar k s

tactic: rw [coplanar_iff_finrank_le_two, ← h]
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
h : finrank k V = 2
this : FiniteDimensional k V
⊢ Coplanar k s

tactic: exact Submodule.finrank_le _
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
h : finrank k V = 2
this : FiniteDimensional k V
⊢ finrank k { x // x ∈ vectorSpan k s } ≤ finrank k V
Theorem: LinearOrderedField.inducedMap_inv_self
File: Mathlib/Algebra/Order/CompleteField.lean

tactic: rw [inducedMap_inducedMap, inducedMap_self]
state_before: F : Type ?u.23977
α : Type ?u.23980
β : Type u_1
γ : Type u_2
inst✝³ : LinearOrderedField α
inst✝² : ConditionallyCompleteLinearOrderedField β
inst✝¹ : ConditionallyCompleteLinearOrderedField γ
inst✝ : Archimedean α
a : α
b✝ : β
q : ℚ
b : β
⊢ inducedMap γ β (inducedMap β γ b) = b
Theorem: Filter.eventually_iff_seq_eventually
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: have : (∀ᶠ n in l, p n) ↔ ¬∃ᶠ n in l, ¬p n := by
  rw [not_frequently]
  simp_rw [not_not]
state_before: ι✝ : Type ?u.370301
ι' : Type ?u.370304
α : Type ?u.370307
β : Type ?u.370310
γ : Type ?u.370313
ι : Type u_1
l : Filter ι
p : ι → Prop
hl : IsCountablyGenerated l
⊢ (∀ᶠ (n : ι) in l, p n) ↔ ∀ (x : ℕ → ι), Tendsto x atTop l → ∀ᶠ (n : ℕ) in atTop, p (x n)

tactic: rw [this, frequently_iff_seq_frequently]
state_before: ι✝ : Type ?u.370301
ι' : Type ?u.370304
α : Type ?u.370307
β : Type ?u.370310
γ : Type ?u.370313
ι : Type u_1
l : Filter ι
p : ι → Prop
hl : IsCountablyGenerated l
this : (∀ᶠ (n : ι) in l, p n) ↔ ¬∃ᶠ (n : ι) in l, ¬p n
⊢ (∀ᶠ (n : ι) in l, p n) ↔ ∀ (x : ℕ → ι), Tendsto x atTop l → ∀ᶠ (n : ℕ) in atTop, p (x n)

tactic: push_neg
state_before: ι✝ : Type ?u.370301
ι' : Type ?u.370304
α : Type ?u.370307
β : Type ?u.370310
γ : Type ?u.370313
ι : Type u_1
l : Filter ι
p : ι → Prop
hl : IsCountablyGenerated l
this : (∀ᶠ (n : ι) in l, p n) ↔ ¬∃ᶠ (n : ι) in l, ¬p n
⊢ (¬∃ x, Tendsto x atTop l ∧ ∃ᶠ (n : ℕ) in atTop, ¬p (x n)) ↔
    ∀ (x : ℕ → ι), Tendsto x atTop l → ∀ᶠ (n : ℕ) in atTop, p (x n)

tactic: simp_rw [not_frequently, not_not]
state_before: ι✝ : Type ?u.370301
ι' : Type ?u.370304
α : Type ?u.370307
β : Type ?u.370310
γ : Type ?u.370313
ι : Type u_1
l : Filter ι
p : ι → Prop
hl : IsCountablyGenerated l
this : (∀ᶠ (n : ι) in l, p n) ↔ ¬∃ᶠ (n : ι) in l, ¬p n
⊢ (∀ (x : ℕ → ι), Tendsto x atTop l → ¬∃ᶠ (n : ℕ) in atTop, ¬p (x n)) ↔
    ∀ (x : ℕ → ι), Tendsto x atTop l → ∀ᶠ (n : ℕ) in atTop, p (x n)

tactic: rw [not_frequently]
state_before: ι✝ : Type ?u.370301
ι' : Type ?u.370304
α : Type ?u.370307
β : Type ?u.370310
γ : Type ?u.370313
ι : Type u_1
l : Filter ι
p : ι → Prop
hl : IsCountablyGenerated l
⊢ (∀ᶠ (n : ι) in l, p n) ↔ ¬∃ᶠ (n : ι) in l, ¬p n

tactic: simp_rw [not_not]
state_before: ι✝ : Type ?u.370301
ι' : Type ?u.370304
α : Type ?u.370307
β : Type ?u.370310
γ : Type ?u.370313
ι : Type u_1
l : Filter ι
p : ι → Prop
hl : IsCountablyGenerated l
⊢ (∀ᶠ (n : ι) in l, p n) ↔ ∀ᶠ (x : ι) in l, ¬¬p x
Theorem: ChartedSpaceCore.open_target
File: Mathlib/Geometry/Manifold/ChartedSpace.lean

tactic: have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
  Subset.antisymm (inter_subset_left _ _) fun x hx ↦
    ⟨hx, LocalEquiv.target_subset_preimage_source _ hx⟩
state_before: H : Type u
H' : Type ?u.57399
M : Type u_1
M' : Type ?u.57405
M'' : Type ?u.57408
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
⊢ IsOpen e.target

tactic: simpa [LocalEquiv.trans_source, E] using c.open_source e e he he
state_before: H : Type u
H' : Type ?u.57399
M : Type u_1
M' : Type ?u.57405
M'' : Type ?u.57408
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
E : e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e.source = e.target
⊢ IsOpen e.target
Theorem: LinearIsometry.re_apply_eq_re
File: Mathlib/Analysis/Complex/Isometry.lean

tactic: apply LinearIsometry.re_apply_eq_re_of_add_conj_eq
state_before: f : ℂ →ₗᵢ[ℝ] ℂ
h : ↑f 1 = 1
z : ℂ
⊢ (↑f z).re = z.re

tactic: intro z
state_before: case h₃
f : ℂ →ₗᵢ[ℝ] ℂ
h : ↑f 1 = 1
z : ℂ
⊢ ∀ (z : ℂ), z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)

tactic: apply LinearIsometry.im_apply_eq_im h
state_before: case h₃
f : ℂ →ₗᵢ[ℝ] ℂ
h : ↑f 1 = 1
z✝ z : ℂ
⊢ z + ↑(starRingEnd ℂ) z = ↑f z + ↑(starRingEnd ((fun x => ℂ) z)) (↑f z)
Theorem: Set.ncard_diff_singleton_lt_of_mem
File: Mathlib/Data/Set/Ncard.lean

tactic: rw [← ncard_diff_singleton_add_one h hs]
state_before: α : Type u_1
β : Type ?u.15901
s t : Set α
a b x y : α
f : α → β
h : a ∈ s
hs : autoParam (Set.Finite s) _auto✝
⊢ ncard (s \ {a}) < ncard s

tactic: apply lt_add_one
state_before: α : Type u_1
β : Type ?u.15901
s t : Set α
a b x y : α
f : α → β
h : a ∈ s
hs : autoParam (Set.Finite s) _auto✝
⊢ ncard (s \ {a}) < ncard (s \ {a}) + 1
Theorem: eq_mul_of_mul_inv_eq
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp [h.symm]
state_before: α : Type ?u.51507
β : Type ?u.51510
G : Type u_1
inst✝ : Group G
a b c d : G
h : a * c⁻¹ = b
⊢ a = b * c