tasksource/leandojo huggingface dataset:
Theorem: List.mem_tails
File: Mathlib/Data/List/Infix.lean

tactic: simp only [tails, mem_singleton, suffix_nil]
state_before: α : Type u_1
β : Type ?u.37187
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
s : List α
⊢ s ∈ tails [] ↔ s <:+ []

tactic: simp only [tails, mem_cons, mem_tails s t]
state_before: α : Type u_1
β : Type ?u.37187
l l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
s : List α
a : α
t : List α
⊢ s ∈ tails (a :: t) ↔ s <:+ a :: t

tactic: exact
  show s = a :: t ∨ s <:+ t ↔ s <:+ a :: t from
    ⟨fun o =>
      match s, t, o with
      | _, t, Or.inl rfl => suffix_rfl
      | s, _, Or.inr ⟨l, rfl⟩ => ⟨a :: l, rfl⟩,
      fun e =>
      match s, t, e with
      | _, t, ⟨[], rfl⟩ => Or.inl rfl
      | s, t, ⟨b :: l, he⟩ => List.noConfusion he fun _ lt => Or.inr ⟨l, lt⟩⟩
state_before: α : Type u_1
β : Type ?u.37187
l l₁ l₂ l₃ : List α
a✝ b : α
m n : ℕ
s : List α
a : α
t : List α
⊢ s = a :: t ∨ s <:+ t ↔ s <:+ a :: t
Theorem: Multiset.count_map_eq_count
File: Mathlib/Data/Multiset/Basic.lean

tactic: suffices (filter (fun a : α => f x = f a) s).count x = card (filter (fun a : α => f x = f a) s) by
  rw [count, countp_map, ← this]
  exact count_filter_of_pos $ rfl
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.415864
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
hf : Set.InjOn f {x | x ∈ s}
x : α
H : x ∈ s
⊢ count (f x) (map f s) = count x s

tactic: rw [count, countp_map, ← this]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.415864
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
hf : Set.InjOn f {x | x ∈ s}
x : α
H : x ∈ s
this : count x (filter (fun a => f x = f a) s) = ↑card (filter (fun a => f x = f a) s)
⊢ count (f x) (map f s) = count x s

tactic: exact count_filter_of_pos $ rfl
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.415864
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
hf : Set.InjOn f {x | x ∈ s}
x : α
H : x ∈ s
this : count x (filter (fun a => f x = f a) s) = ↑card (filter (fun a => f x = f a) s)
⊢ count x (filter (fun a => f x = f a) s) = count x s

tactic: rw [eq_replicate_card.2 fun b hb => (hf H (mem_filter.1 hb).left _).symm]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.415864
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
hf : Set.InjOn f {x | x ∈ s}
x : α
H : x ∈ s
⊢ count x (filter (fun a => f x = f a) s) = ↑card (filter (fun a => f x = f a) s)

tactic: simp only [count_replicate, eq_self_iff_true, if_true, card_replicate]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.415864
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
hf : Set.InjOn f {x | x ∈ s}
x : α
H : x ∈ s
⊢ count x (replicate (↑card (filter (fun a => f x = f a) s)) x) =
    ↑card (replicate (↑card (filter (fun a => f x = f a) s)) x)

tactic: simp only [mem_filter, beq_iff_eq, and_imp, @eq_comm _ (f x), imp_self, implies_true]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.415864
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
s : Multiset α
hf : Set.InjOn f {x | x ∈ s}
x : α
H : x ∈ s
⊢ ∀ (b : α), b ∈ filter (fun a => f x = f a) s → f x = f b
Theorem: nhds_translation_div
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: simpa only [div_eq_mul_inv] using nhds_translation_mul_inv x
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : TopologicalGroup G
x : G
⊢ comap (fun x_1 => x_1 / x) (𝓝 1) = 𝓝 x
Theorem: Submodule.fg_iff_exists_fin_generating_family
File: Mathlib/RingTheory/Finiteness.lean

tactic: rw [fg_def]
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ FG N ↔ ∃ n s, span R (range s) = N

tactic: constructor
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ S, Set.Finite S ∧ span R S = N) ↔ ∃ n s, span R (range s) = N

tactic: rintro ⟨S, Sfin, hS⟩
state_before: case mp
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ S, Set.Finite S ∧ span R S = N) → ∃ n s, span R (range s) = N

tactic: obtain ⟨n, f, rfl⟩ := Sfin.fin_embedding
state_before: case mp.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
S : Set M
Sfin : Set.Finite S
hS : span R S = N
⊢ ∃ n s, span R (range s) = N

tactic: exact ⟨n, f, hS⟩
state_before: case mp.intro.intro.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
n : ℕ
f : Fin n ↪ M
Sfin : Set.Finite (range ↑f)
hS : span R (range ↑f) = N
⊢ ∃ n s, span R (range s) = N

tactic: rintro ⟨n, s, hs⟩
state_before: case mpr
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
⊢ (∃ n s, span R (range s) = N) → ∃ S, Set.Finite S ∧ span R S = N

tactic: refine' ⟨range s, finite_range s, hs⟩
state_before: case mpr.intro.intro
R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
N : Submodule R M
n : ℕ
s : Fin n → M
hs : span R (range s) = N
⊢ ∃ S, Set.Finite S ∧ span R S = N
Theorem: Disjoint.le_symmDiff_sup_symmDiff_right
File: Mathlib/Order/SymmDiff.lean

tactic: simp_rw [symmDiff_comm a]
state_before: ι : Type ?u.94740
α : Type u_1
β : Type ?u.94746
π : ι → Type ?u.94751
inst✝ : BooleanAlgebra α
a b c d : α
h : Disjoint b c
⊢ a ≤ a ∆ b ⊔ a ∆ c

tactic: exact h.le_symmDiff_sup_symmDiff_left
state_before: ι : Type ?u.94740
α : Type u_1
β : Type ?u.94746
π : ι → Type ?u.94751
inst✝ : BooleanAlgebra α
a b c d : α
h : Disjoint b c
⊢ a ≤ b ∆ a ⊔ c ∆ a
Theorem: List.disjoint_left
File: Std/Data/List/Lemmas.lean

tactic: simp [Disjoint]
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
⊢ Disjoint l₁ l₂ ↔ ∀ ⦃a : α✝⦄, a ∈ l₁ → ¬a ∈ l₂
Theorem: String.any_iff
File: Std/Data/String/Lemmas.lean

tactic: simp [any_eq]
state_before: s : String
p : Char → Bool
⊢ any s p = true ↔ ∃ c, c ∈ s.data ∧ p c = true
Theorem: ENNReal.inv_le_iff_inv_le
File: Mathlib/Data/Real/ENNReal.lean

tactic: simpa only [inv_inv] using @ENNReal.inv_le_inv a b⁻¹
state_before: α : Type ?u.268745
β : Type ?u.268748
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a⁻¹ ≤ b ↔ b⁻¹ ≤ a
Theorem: InnerProductGeometry.angle_neg_left
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: rw [← angle_neg_neg, neg_neg, angle_neg_right]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y✝ x y : V
⊢ angle (-x) y = π - angle x y
Theorem: ProbabilityTheory.kernel.sum_comm
File: Mathlib/Probability/Kernel/Basic.lean

tactic: ext a s
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κ : ι → ι → { x // x ∈ kernel α β }
⊢ (kernel.sum fun n => kernel.sum (κ n)) = kernel.sum fun m => kernel.sum fun n => κ n m

tactic: intro
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κ : ι → ι → { x // x ∈ kernel α β }
a : α
s : Set β
⊢ MeasurableSet s →
    ↑↑(↑(kernel.sum fun n => kernel.sum (κ n)) a) s = ↑↑(↑(kernel.sum fun m => kernel.sum fun n => κ n m) a) s

tactic: simp_rw [sum_apply]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κ : ι → ι → { x // x ∈ kernel α β }
a : α
s : Set β
a✝ : MeasurableSet s
⊢ ↑↑(↑(kernel.sum fun n => kernel.sum (κ n)) a) s = ↑↑(↑(kernel.sum fun m => kernel.sum fun n => κ n m) a) s

tactic: rw [Measure.sum_comm]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κ : ι → ι → { x // x ∈ kernel α β }
a : α
s : Set β
a✝ : MeasurableSet s
⊢ ↑↑(Measure.sum fun n => Measure.sum fun n_1 => ↑(κ n n_1) a) s =
    ↑↑(Measure.sum fun n => Measure.sum fun n_1 => ↑(κ n_1 n) a) s
Theorem: Filter.HasBasis.equicontinuousAt_iff
File: Mathlib/Topology/UniformSpace/Equicontinuity.lean

tactic: rw [equicontinuousAt_iff_continuousAt, ContinuousAt,
  hX.tendsto_iff (UniformFun.hasBasis_nhds_of_basis ι α _ hα)]
state_before: ι : Type u_5
κ : Type ?u.123707
X : Type u_3
Y : Type ?u.123713
Z : Type ?u.123716
α : Type u_4
β : Type ?u.123722
γ : Type ?u.123725
𝓕 : Type ?u.123728
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
κ₁ : Type u_1
κ₂ : Type u_2
p₁ : κ₁ → Prop
s₁ : κ₁ → Set X
p₂ : κ₂ → Prop
s₂ : κ₂ → Set (α × α)
F : ι → X → α
x₀ : X
hX : HasBasis (𝓝 x₀) p₁ s₁
hα : HasBasis (𝓤 α) p₂ s₂
⊢ EquicontinuousAt F x₀ ↔ ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ (x : X), x ∈ s₁ k₁ → ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂

tactic: simp only [Function.comp_apply, mem_setOf_eq, exists_prop]
state_before: ι : Type u_5
κ : Type ?u.123707
X : Type u_3
Y : Type ?u.123713
Z : Type ?u.123716
α : Type u_4
β : Type ?u.123722
γ : Type ?u.123725
𝓕 : Type ?u.123728
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
κ₁ : Type u_1
κ₂ : Type u_2
p₁ : κ₁ → Prop
s₁ : κ₁ → Set X
p₂ : κ₂ → Prop
s₂ : κ₂ → Set (α × α)
F : ι → X → α
x₀ : X
hX : HasBasis (𝓝 x₀) p₁ s₁
hα : HasBasis (𝓤 α) p₂ s₂
⊢ (∀ (ib : κ₂),
      p₂ ib →
        ∃ ia,
          p₁ ia ∧
            ∀ (x : X),
              x ∈ s₁ ia →
                (↑UniformFun.ofFun ∘ Function.swap F) x ∈
                  {g | ((↑UniformFun.ofFun ∘ Function.swap F) x₀, g) ∈ UniformFun.gen ι α (s₂ ib)}) ↔
    ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ (x : X), x ∈ s₁ k₁ → ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂

tactic: rfl
state_before: ι : Type u_5
κ : Type ?u.123707
X : Type u_3
Y : Type ?u.123713
Z : Type ?u.123716
α : Type u_4
β : Type ?u.123722
γ : Type ?u.123725
𝓕 : Type ?u.123728
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
κ₁ : Type u_1
κ₂ : Type u_2
p₁ : κ₁ → Prop
s₁ : κ₁ → Set X
p₂ : κ₂ → Prop
s₂ : κ₂ → Set (α × α)
F : ι → X → α
x₀ : X
hX : HasBasis (𝓝 x₀) p₁ s₁
hα : HasBasis (𝓤 α) p₂ s₂
⊢ (∀ (ib : κ₂),
      p₂ ib →
        ∃ ia,
          p₁ ia ∧
            ∀ (x : X),
              x ∈ s₁ ia →
                (↑UniformFun.ofFun (Function.swap F x₀), ↑UniformFun.ofFun (Function.swap F x)) ∈
                  UniformFun.gen ι α (s₂ ib)) ↔
    ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ (x : X), x ∈ s₁ k₁ → ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂
Theorem: Ordinal.bsup_one
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp_rw [← sup_eq_bsup, sup_unique, familyOfBFamily, familyOfBFamily', typein_one_out]
state_before: α : Type ?u.315442
β : Type ?u.315445
γ : Type ?u.315448
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
f : (a : Ordinal) → a < 1 → Ordinal
⊢ bsup 1 f = f 0 (_ : 0 < 1)
Theorem: mul_add_mul_le_mul_add_mul
File: Mathlib/Algebra/Order/Ring/Canonical.lean

tactic: obtain ⟨b, rfl⟩ := exists_add_of_le hab
state_before: α : Type u
β : Type ?u.1549
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
hab : a ≤ b
hcd : c ≤ d
⊢ a * d + b * c ≤ a * c + b * d

tactic: obtain ⟨d, rfl⟩ := exists_add_of_le hcd
state_before: case intro
α : Type u
β : Type ?u.1549
inst✝¹ : StrictOrderedSemiring α
a c d : α
inst✝ : ExistsAddOfLE α
hcd : c ≤ d
b : α
hab : a ≤ a + b
⊢ a * d + (a + b) * c ≤ a * c + (a + b) * d

tactic: rw [mul_add, add_right_comm, mul_add, ← add_assoc]
state_before: case intro.intro
α : Type u
β : Type ?u.1549
inst✝¹ : StrictOrderedSemiring α
a c : α
inst✝ : ExistsAddOfLE α
b : α
hab : a ≤ a + b
d : α
hcd : c ≤ c + d
⊢ a * (c + d) + (a + b) * c ≤ a * c + (a + b) * (c + d)

tactic: exact add_le_add_left (mul_le_mul_of_nonneg_right hab <| (le_add_iff_nonneg_right _).1 hcd) _
state_before: case intro.intro
α : Type u
β : Type ?u.1549
inst✝¹ : StrictOrderedSemiring α
a c : α
inst✝ : ExistsAddOfLE α
b : α
hab : a ≤ a + b
d : α
hcd : c ≤ c + d
⊢ a * c + (a + b) * c + a * d ≤ a * c + (a + b) * c + (a + b) * d
Theorem: Real.continuousOn_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: suffices ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0} by
  have h_eq : (fun x => sin x / cos x) = tan := by ext1 x; rw [tan_eq_sin_div_cos]
  rwa [h_eq] at this
state_before: ⊢ ContinuousOn tan {x | cos x ≠ 0}

tactic: exact continuousOn_sin.div continuousOn_cos fun x => id
state_before: ⊢ ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}

tactic: have h_eq : (fun x => sin x / cos x) = tan := by ext1 x; rw [tan_eq_sin_div_cos]
state_before: this : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}
⊢ ContinuousOn tan {x | cos x ≠ 0}

tactic: rwa [h_eq] at this
state_before: this : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}
h_eq : (fun x => sin x / cos x) = tan
⊢ ContinuousOn tan {x | cos x ≠ 0}

tactic: ext1 x
state_before: this : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}
⊢ (fun x => sin x / cos x) = tan

tactic: rw [tan_eq_sin_div_cos]
state_before: case h
this : ContinuousOn (fun x => sin x / cos x) {x | cos x ≠ 0}
x : ℝ
⊢ sin x / cos x = tan x
Theorem: Nat.cast_floor_eq_cast_int_floor
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← Nat.cast_floor_eq_int_floor ha, Int.cast_ofNat]
state_before: F : Type ?u.310443
α : Type u_1
β : Type ?u.310449
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
a : α
ha : 0 ≤ a
⊢ ↑⌊a⌋₊ = ↑⌊a⌋
Theorem: CategoryTheory.Limits.Cone.ofTrident_π
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

tactic: cases j <;> aesop_cat
state_before: J : Type w
C : Type u
inst✝ : Category C
X Y : C
f : J → (X ⟶ Y)
F : WalkingParallelFamily J ⥤ C
t : Trident fun j => F.map (line j)
j : WalkingParallelFamily J
⊢ (parallelFamily fun j => F.map (line j)).obj j = F.obj j
Theorem: rank_range_le
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: simpa using lift_rank_range_le f
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.39409
R : Type u
inst✝⁶ : Ring R
M : Type v
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M' : Type v'
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
M₁ : Type v
inst✝¹ : AddCommGroup M₁
inst✝ : Module R M₁
f : M →ₗ[R] M₁
⊢ Module.rank R { x // x ∈ LinearMap.range f } ≤ Module.rank R M
Theorem: Multiset.naturality
File: Mathlib/Data/Multiset/Functor.lean

tactic: refine' Quotient.inductionOn x _
state_before: F : Type u → Type u
inst✝⁵ : Applicative F
inst✝⁴ : CommApplicative F
α' β' : Type u
f✝ : α' → F β'
G H : Type u_1 → Type u_1
inst✝³ : Applicative G
inst✝² : Applicative H
inst✝¹ : CommApplicative G
inst✝ : CommApplicative H
eta : ApplicativeTransformation G H
α β : Type u_1
f : α → G β
x : Multiset α
⊢ (fun {α} => ApplicativeTransformation.app eta α) (traverse f x) =
    traverse ((fun {α} => ApplicativeTransformation.app eta α) ∘ f) x

tactic: intro
state_before: F : Type u → Type u
inst✝⁵ : Applicative F
inst✝⁴ : CommApplicative F
α' β' : Type u
f✝ : α' → F β'
G H : Type u_1 → Type u_1
inst✝³ : Applicative G
inst✝² : Applicative H
inst✝¹ : CommApplicative G
inst✝ : CommApplicative H
eta : ApplicativeTransformation G H
α β : Type u_1
f : α → G β
x : Multiset α
⊢ ∀ (a : List α),
    (fun {α} => ApplicativeTransformation.app eta α) (traverse f (Quotient.mk (isSetoid α) a)) =
      traverse ((fun {α} => ApplicativeTransformation.app eta α) ∘ f) (Quotient.mk (isSetoid α) a)

tactic: simp only [quot_mk_to_coe, traverse, lift_coe, Function.comp_apply,
  ApplicativeTransformation.preserves_map, IsLawfulTraversable.naturality]
state_before: F : Type u → Type u
inst✝⁵ : Applicative F
inst✝⁴ : CommApplicative F
α' β' : Type u
f✝ : α' → F β'
G H : Type u_1 → Type u_1
inst✝³ : Applicative G
inst✝² : Applicative H
inst✝¹ : CommApplicative G
inst✝ : CommApplicative H
eta : ApplicativeTransformation G H
α β : Type u_1
f : α → G β
x : Multiset α
a✝ : List α
⊢ (fun {α} => ApplicativeTransformation.app eta α) (traverse f (Quotient.mk (isSetoid α) a✝)) =
    traverse ((fun {α} => ApplicativeTransformation.app eta α) ∘ f) (Quotient.mk (isSetoid α) a✝)
Theorem: two_mul_card_alternatingGroup
File: Mathlib/GroupTheory/SpecificGroups/Alternating.lean

tactic: let this := (QuotientGroup.quotientKerEquivOfSurjective _ (sign_surjective α)).toEquiv
state_before: α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
inst✝ : Nontrivial α
⊢ 2 * card { x // x ∈ alternatingGroup α } = card (Perm α)

tactic: rw [← Fintype.card_units_int, ← Fintype.card_congr this]
state_before: α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
inst✝ : Nontrivial α
this : Perm α ⧸ MonoidHom.ker sign ≃ ℤˣ :=
  (QuotientGroup.quotientKerEquivOfSurjective sign (_ : Function.Surjective ↑sign)).toEquiv
⊢ 2 * card { x // x ∈ alternatingGroup α } = card (Perm α)

tactic: apply (Subgroup.card_eq_card_quotient_mul_card_subgroup _).symm
state_before: α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
inst✝ : Nontrivial α
this : Perm α ⧸ MonoidHom.ker sign ≃ ℤˣ :=
  (QuotientGroup.quotientKerEquivOfSurjective sign (_ : Function.Surjective ↑sign)).toEquiv
⊢ card (Perm α ⧸ MonoidHom.ker sign) * card { x // x ∈ alternatingGroup α } = card (Perm α)
Theorem: SeparationQuotient.tendsto_lift_nhdsWithin_mk
File: Mathlib/Topology/Inseparable.lean

tactic: simp only [← map_mk_nhdsWithin_preimage, tendsto_map'_iff, lift_comp_mk]
state_before: X : Type u_1
Y : Type ?u.102238
Z : Type ?u.102241
α : Type u_2
ι : Type ?u.102247
π : ι → Type ?u.102252
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : (i : ι) → TopologicalSpace (π i)
x✝ y z : X
s✝ : Set X
f✝ : X → Y
t : Set (SeparationQuotient X)
f : X → α
hf : ∀ (x y : X), (x ~ᵢ y) → f x = f y
x : X
s : Set (SeparationQuotient X)
l : Filter α
⊢ Tendsto (lift f hf) (𝓝[s] mk x) l ↔ Tendsto f (𝓝[mk ⁻¹' s] x) l
Theorem: Squarefree.isRadical
File: Mathlib/Algebra/Squarefree.lean

tactic: by_cases gcd x y = 0
state_before: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
hy : x ∣ y ^ 2
⊢ x ∣ gcd x y

tactic: replace hy := ((dvd_gcd_iff x x _).2 ⟨dvd_rfl, hy⟩).trans gcd_pow_right_dvd_pow_gcd
state_before: case neg
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
hy : x ∣ y ^ 2
h : ¬gcd x y = 0
⊢ x ∣ gcd x y

tactic: obtain ⟨z, hz⟩ := gcd_dvd_left x y
state_before: case neg
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
h : ¬gcd x y = 0
hy : x ∣ gcd x y ^ 2
⊢ x ∣ gcd x y

tactic: nth_rw 1 [hz] at hy⊢
state_before: case neg.intro
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
h : ¬gcd x y = 0
hy : x ∣ gcd x y ^ 2
z : R
hz : x = gcd x y * z
⊢ x ∣ gcd x y

tactic: rw [pow_two, mul_dvd_mul_iff_left h] at hy
state_before: case neg.intro
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
h : ¬gcd x y = 0
z : R
hy : gcd x y * z ∣ gcd x y ^ 2
hz : x = gcd x y * z
⊢ gcd x y * z ∣ gcd x y

tactic: obtain ⟨w, hw⟩ := hy
state_before: case neg.intro
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
h : ¬gcd x y = 0
z : R
hy : z ∣ gcd x y
hz : x = gcd x y * z
⊢ gcd x y * z ∣ gcd x y

tactic: exact (hx z ⟨w, by rwa [mul_right_comm, ← hw]⟩).mul_right_dvd.2 dvd_rfl
state_before: case neg.intro.intro
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
h : ¬gcd x y = 0
z : R
hz : x = gcd x y * z
w : R
hw : gcd x y = z * w
⊢ gcd x y * z ∣ gcd x y

tactic: rw [h]
state_before: case pos
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
hy : x ∣ y ^ 2
h : gcd x y = 0
⊢ x ∣ gcd x y

tactic: apply dvd_zero
state_before: case pos
R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
hy : x ∣ y ^ 2
h : gcd x y = 0
⊢ x ∣ 0

tactic: rwa [mul_right_comm, ← hw]
state_before: R : Type u_1
inst✝¹ : CancelCommMonoidWithZero R
inst✝ : GCDMonoid R
x : R
hx : Squarefree x
y : R
h : ¬gcd x y = 0
z : R
hz : x = gcd x y * z
w : R
hw : gcd x y = z * w
⊢ x = z * z * w
Theorem: Rat.le_def
File: Mathlib/Data/Rat/Order.lean

tactic: rw [Rat.le_iff_Nonneg]
state_before: a✝ b✝ c✝ : ℚ
a b c d : ℤ
b0 : 0 < b
d0 : 0 < d
⊢ a /. b ≤ c /. d ↔ a * d ≤ c * b

tactic: show Rat.Nonneg _ ↔ _
state_before: a✝ b✝ c✝ : ℚ
a b c d : ℤ
b0 : 0 < b
d0 : 0 < d
⊢ Rat.Nonneg (c /. d - a /. b) ↔ a * d ≤ c * b

tactic: rw [← sub_nonneg]
state_before: a✝ b✝ c✝ : ℚ
a b c d : ℤ
b0 : 0 < b
d0 : 0 < d
⊢ Rat.Nonneg (c /. d - a /. b) ↔ a * d ≤ c * b

tactic: simp [sub_eq_add_neg, ne_of_gt b0, ne_of_gt d0, mul_pos d0 b0]
state_before: a✝ b✝ c✝ : ℚ
a b c d : ℤ
b0 : 0 < b
d0 : 0 < d
⊢ Rat.Nonneg (c /. d - a /. b) ↔ 0 ≤ c * b - a * d
Theorem: Set.piecewise_le
File: Mathlib/Data/Set/Function.lean

tactic: simp [*]
state_before: α : Type u_2
β : Type ?u.80310
γ : Type ?u.80313
ι : Sort ?u.80316
π : α → Type ?u.80321
δ✝ : α → Sort ?u.80326
s✝ : Set α
f g✝ : (i : α) → δ✝ i
inst✝² : (j : α) → Decidable (j ∈ s✝)
δ : α → Type u_1
inst✝¹ : (i : α) → Preorder (δ i)
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
f₁ f₂ g : (i : α) → δ i
h₁ : ∀ (i : α), i ∈ s → f₁ i ≤ g i
h₂ : ∀ (i : α), ¬i ∈ s → f₂ i ≤ g i
i : α
h : i ∈ s
⊢ piecewise s f₁ f₂ i ≤ g i

tactic: simp [*]
state_before: α : Type u_2
β : Type ?u.80310
γ : Type ?u.80313
ι : Sort ?u.80316
π : α → Type ?u.80321
δ✝ : α → Sort ?u.80326
s✝ : Set α
f g✝ : (i : α) → δ✝ i
inst✝² : (j : α) → Decidable (j ∈ s✝)
δ : α → Type u_1
inst✝¹ : (i : α) → Preorder (δ i)
s : Set α
inst✝ : (j : α) → Decidable (j ∈ s)
f₁ f₂ g : (i : α) → δ i
h₁ : ∀ (i : α), i ∈ s → f₁ i ≤ g i
h₂ : ∀ (i : α), ¬i ∈ s → f₂ i ≤ g i
i : α
h : ¬i ∈ s
⊢ piecewise s f₁ f₂ i ≤ g i
Theorem: HasDerivAt.smul
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: rw [← hasDerivWithinAt_univ] at *
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
c : 𝕜 → 𝕜'
c' : 𝕜'
hc : HasDerivAt c c' x
hf : HasDerivAt f f' x
⊢ HasDerivAt (fun y => c y • f y) (c x • f' + c' • f x) x

tactic: exact hc.smul hf
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
E : Type w
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝³ : NontriviallyNormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
c : 𝕜 → 𝕜'
c' : 𝕜'
hc : HasDerivWithinAt c c' univ x
hf : HasDerivWithinAt f f' univ x
⊢ HasDerivWithinAt (fun y => c y • f y) (c x • f' + c' • f x) univ x
Theorem: Filter.HasBasis.sup'
File: Mathlib/Order/Filter/Bases.lean

tactic: intro t
state_before: α : Type u_1
β : Type ?u.39210
γ : Type ?u.39213
ι : Sort u_2
ι' : Sort u_3
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
hl : HasBasis l p s
hl' : HasBasis l' p' s'
⊢ ∀ (t : Set α), t ∈ l ⊔ l' ↔ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∪ s' i.snd ⊆ t

tactic: simp_rw [mem_sup, hl.mem_iff, hl'.mem_iff, PProd.exists, union_subset_iff,
   ← exists_and_right, ← exists_and_left]
state_before: α : Type u_1
β : Type ?u.39210
γ : Type ?u.39213
ι : Sort u_2
ι' : Sort u_3
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
hl : HasBasis l p s
hl' : HasBasis l' p' s'
t : Set α
⊢ t ∈ l ⊔ l' ↔ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∪ s' i.snd ⊆ t

tactic: simp only [and_assoc, and_left_comm]
state_before: α : Type u_1
β : Type ?u.39210
γ : Type ?u.39213
ι : Sort u_2
ι' : Sort u_3
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
hl : HasBasis l p s
hl' : HasBasis l' p' s'
t : Set α
⊢ (∃ x x_1, (p x ∧ s x ⊆ t) ∧ p' x_1 ∧ s' x_1 ⊆ t) ↔ ∃ a b, (p a ∧ p' b) ∧ s a ⊆ t ∧ s' b ⊆ t