tasksource/leandojo huggingface dataset:
Theorem: Function.Embedding.exists_of_card_le_finset
File: Mathlib/Data/Fintype/Card.lean

tactic: rw [← Fintype.card_coe] at h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.51492
inst✝ : Fintype α
s : Finset β
h : Fintype.card α ≤ card s
⊢ ∃ f, Set.range ↑f ⊆ ↑s

tactic: rcases nonempty_of_card_le h with ⟨f⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.51492
inst✝ : Fintype α
s : Finset β
h : Fintype.card α ≤ Fintype.card { x // x ∈ s }
⊢ ∃ f, Set.range ↑f ⊆ ↑s

tactic: exact ⟨f.trans (Embedding.subtype _), by simp [Set.range_subset_iff]⟩
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.51492
inst✝ : Fintype α
s : Finset β
h : Fintype.card α ≤ Fintype.card { x // x ∈ s }
f : α ↪ { x // x ∈ s }
⊢ ∃ f, Set.range ↑f ⊆ ↑s

tactic: simp [Set.range_subset_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.51492
inst✝ : Fintype α
s : Finset β
h : Fintype.card α ≤ Fintype.card { x // x ∈ s }
f : α ↪ { x // x ∈ s }
⊢ Set.range ↑(Embedding.trans f (subtype fun x => x ∈ s)) ⊆ ↑s
Theorem: CategoryTheory.finrank_hom_simple_simple
File: Mathlib/CategoryTheory/Preadditive/Schur.lean

tactic: split_ifs with h
state_before: C : Type u_3
inst✝⁸ : Category C
inst✝⁷ : Preadditive C
𝕜 : Type u_1
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
⊢ finrank 𝕜 (X ⟶ Y) = if Nonempty (X ≅ Y) then 1 else 0

tactic: exact (finrank_hom_simple_simple_eq_one_iff 𝕜 X Y).2 h
state_before: case inl
C : Type u_3
inst✝⁸ : Category C
inst✝⁷ : Preadditive C
𝕜 : Type u_1
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 1

case inr
C : Type u_3
inst✝⁸ : Category C
inst✝⁷ : Preadditive C
𝕜 : Type u_1
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : ¬Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 0

tactic: exact (finrank_hom_simple_simple_eq_zero_iff 𝕜 X Y).2 (not_nonempty_iff.mp h)
state_before: case inr
C : Type u_3
inst✝⁸ : Category C
inst✝⁷ : Preadditive C
𝕜 : Type u_1
inst✝⁶ : Field 𝕜
inst✝⁵ : IsAlgClosed 𝕜
inst✝⁴ : Linear 𝕜 C
inst✝³ : HasKernels C
X Y : C
inst✝² : ∀ (X Y : C), FiniteDimensional 𝕜 (X ⟶ Y)
inst✝¹ : Simple X
inst✝ : Simple Y
h : ¬Nonempty (X ≅ Y)
⊢ finrank 𝕜 (X ⟶ Y) = 0
Theorem: CategoryTheory.Limits.map_lift_piComparison
File: Mathlib/CategoryTheory/Limits/Shapes/Products.lean

tactic: ext j
state_before: β : Type w
C : Type u
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
G : C ⥤ D
f : β → C
inst✝¹ : HasProduct f
inst✝ : HasProduct fun b => G.obj (f b)
P : C
g : (j : β) → P ⟶ f j
⊢ G.map (Pi.lift g) ≫ piComparison G f = Pi.lift fun j => G.map (g j)

tactic: simp only [Discrete.functor_obj, Category.assoc, piComparison_comp_π, ← G.map_comp,
  limit.lift_π, Fan.mk_pt, Fan.mk_π_app]
state_before: case h
β : Type w
C : Type u
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
G : C ⥤ D
f : β → C
inst✝¹ : HasProduct f
inst✝ : HasProduct fun b => G.obj (f b)
P : C
g : (j : β) → P ⟶ f j
j : β
⊢ (G.map (Pi.lift g) ≫ piComparison G f) ≫ Pi.π (fun b => G.obj (f b)) j =
    (Pi.lift fun j => G.map (g j)) ≫ Pi.π (fun b => G.obj (f b)) j
Theorem: Substring.Valid.nextn
File: Std/Data/String/Lemmas.lean

tactic: let ⟨l, m, r, h⟩ := h.validFor
state_before: m₁ m₂ : List Char
x✝ : Substring
h : Valid x✝
e : (toString x✝).data = m₁ ++ m₂
⊢ ∀ (n : Nat), Substring.nextn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len m₁ + utf8Len (List.take n m₂) }

tactic: simp [h.toString] at e
state_before: m₁ m₂ : List Char
x✝ : Substring
h✝ : Valid x✝
e : (toString x✝).data = m₁ ++ m₂
l m r : List Char
h : ValidFor l m r x✝
⊢ ∀ (n : Nat), Substring.nextn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len m₁ + utf8Len (List.take n m₂) }

tactic: subst e
state_before: m₁ m₂ : List Char
x✝ : Substring
h✝ : Valid x✝
l m r : List Char
h : ValidFor l m r x✝
e : m = m₁ ++ m₂
⊢ ∀ (n : Nat), Substring.nextn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len m₁ + utf8Len (List.take n m₂) }

tactic: simp [h.nextn]
state_before: m₁ m₂ : List Char
x✝ : Substring
h✝ : Valid x✝
l r : List Char
h : ValidFor l (m₁ ++ m₂) r x✝
⊢ ∀ (n : Nat), Substring.nextn x✝ n { byteIdx := utf8Len m₁ } = { byteIdx := utf8Len m₁ + utf8Len (List.take n m₂) }
Theorem: CategoryTheory.Limits.WidePullback.lift_π
File: Mathlib/CategoryTheory/Limits/Shapes/WidePullbacks.lean

tactic: simp only [limit.lift_π, WidePullbackShape.mkCone_pt, WidePullbackShape.mkCone_π_app]
state_before: J : Type w
C : Type u
inst✝² : Category C
D : Type u_1
inst✝¹ : Category D
B : D
objs : J → D
arrows : (j : J) → objs j ⟶ B
inst✝ : HasWidePullback B objs arrows
X : D
f : X ⟶ B
fs : (j : J) → X ⟶ objs j
w : ∀ (j : J), fs j ≫ arrows j = f
j : J
⊢ lift f fs w ≫ π arrows j = fs j
Theorem: mul_eq_one
File: Mathlib/Algebra/Group/Units.lean

tactic: rintro ⟨rfl, rfl⟩
state_before: α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
a b : α
⊢ a = 1 ∧ b = 1 → a * b = 1

tactic: exact mul_one _
state_before: case intro
α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
⊢ 1 * 1 = 1
Theorem: AffineEquiv.affineIndependent_set_of_eq_iff
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: have : e ∘ ((↑) : s → P) = ((↑) : e '' s → P₂) ∘ (e : P ≃ P₂).image s := rfl
state_before: k : Type u_2
V : Type u_4
P : Type u_1
inst✝⁶ : Ring k
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module k V
inst✝³ : AffineSpace V P
ι : Type ?u.331791
V₂ : Type u_5
P₂ : Type u_3
inst✝² : AddCommGroup V₂
inst✝¹ : Module k V₂
inst✝ : AffineSpace V₂ P₂
s : Set P
e : P ≃ᵃ[k] P₂
⊢ AffineIndependent k Subtype.val ↔ AffineIndependent k Subtype.val

tactic: rw [← e.affineIndependent_iff, this, affineIndependent_equiv]
state_before: k : Type u_2
V : Type u_4
P : Type u_1
inst✝⁶ : Ring k
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module k V
inst✝³ : AffineSpace V P
ι : Type ?u.331791
V₂ : Type u_5
P₂ : Type u_3
inst✝² : AddCommGroup V₂
inst✝¹ : Module k V₂
inst✝ : AffineSpace V₂ P₂
s : Set P
e : P ≃ᵃ[k] P₂
this : ↑e ∘ Subtype.val = Subtype.val ∘ ↑(Equiv.image (↑e) s)
⊢ AffineIndependent k Subtype.val ↔ AffineIndependent k Subtype.val
Theorem: linearIndependent_fin_snoc
File: Mathlib/LinearAlgebra/LinearIndependent.lean

tactic: erw [Fin.snoc_eq_cons_rotate, linearIndependent_equiv, linearIndependent_fin_cons]
state_before: ι : Type u'
ι' : Type ?u.1244590
R : Type ?u.1244593
K : Type u_1
M : Type ?u.1244599
M' : Type ?u.1244602
M'' : Type ?u.1244605
V : Type u
V' : Type ?u.1244610
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v✝ : ι → V
s t : Set V
x y z : V
n : ℕ
v : Fin n → V
⊢ LinearIndependent K (Fin.snoc v x) ↔ LinearIndependent K v ∧ ¬x ∈ span K (range v)
Theorem: Metric.diam_union'
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rcases h with ⟨x, ⟨xs, xt⟩⟩
state_before: α : Type u
β : Type v
X : Type ?u.537111
ι : Type ?u.537114
inst✝ : PseudoMetricSpace α
s : Set α
x y z : α
t : Set α
h : Set.Nonempty (s ∩ t)
⊢ diam (s ∪ t) ≤ diam s + diam t

tactic: simpa using diam_union xs xt
state_before: case intro.intro
α : Type u
β : Type v
X : Type ?u.537111
ι : Type ?u.537114
inst✝ : PseudoMetricSpace α
s : Set α
x✝ y z : α
t : Set α
x : α
xs : x ∈ s
xt : x ∈ t
⊢ diam (s ∪ t) ≤ diam s + diam t
Theorem: exists_dual_vector''
File: Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean

tactic: by_cases hx : x = 0
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
⊢ ∃ g, ‖g‖ ≤ 1 ∧ ↑g x = ↑‖x‖

tactic: refine' ⟨0, by simp, _⟩
state_before: case pos
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x = 0
⊢ ∃ g, ‖g‖ ≤ 1 ∧ ↑g x = ↑‖x‖

tactic: symm
state_before: case pos
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x = 0
⊢ ↑0 x = ↑‖x‖

tactic: simp [hx]
state_before: case pos
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x = 0
⊢ ↑‖x‖ = ↑0 x

tactic: simp
state_before: 𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : x = 0
⊢ ‖0‖ ≤ 1

tactic: rcases exists_dual_vector 𝕜 x hx with ⟨g, g_norm, g_eq⟩
state_before: case neg
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : ¬x = 0
⊢ ∃ g, ‖g‖ ≤ 1 ∧ ↑g x = ↑‖x‖

tactic: exact ⟨g, g_norm.le, g_eq⟩
state_before: case neg.intro.intro
𝕜 : Type v
inst✝² : IsROrC 𝕜
E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x : E
hx : ¬x = 0
g : E →L[𝕜] 𝕜
g_norm : ‖g‖ = 1
g_eq : ↑g x = ↑‖x‖
⊢ ∃ g, ‖g‖ ≤ 1 ∧ ↑g x = ↑‖x‖
Theorem: LieAlgebra.abelian_radical_iff_solvable_is_abelian
File: Mathlib/Algebra/Lie/Semisimple.lean

tactic: constructor
state_before: R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
⊢ IsLieAbelian { x // x ∈ ↑(radical R L) } ↔
    ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }

tactic: rintro h₁ I h₂
state_before: case mp
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
⊢ IsLieAbelian { x // x ∈ ↑(radical R L) } →
    ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }

tactic: rw [LieIdeal.solvable_iff_le_radical] at h₂
state_before: case mp
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
h₁ : IsLieAbelian { x // x ∈ ↑(radical R L) }
I : LieIdeal R L
h₂ : IsSolvable R { x // x ∈ ↑I }
⊢ IsLieAbelian { x // x ∈ ↑I }

tactic: exact (LieIdeal.homOfLe_injective h₂).isLieAbelian h₁
state_before: case mp
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
h₁ : IsLieAbelian { x // x ∈ ↑(radical R L) }
I : LieIdeal R L
h₂ : I ≤ radical R L
⊢ IsLieAbelian { x // x ∈ ↑I }

tactic: intro h
state_before: case mpr
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
⊢ (∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }) →
    IsLieAbelian { x // x ∈ ↑(radical R L) }

tactic: apply h
state_before: case mpr
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
h : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }
⊢ IsLieAbelian { x // x ∈ ↑(radical R L) }

tactic: infer_instance
state_before: case mpr.a
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsNoetherian R L
h : ∀ (I : LieIdeal R L), IsSolvable R { x // x ∈ ↑I } → IsLieAbelian { x // x ∈ ↑I }
⊢ IsSolvable R { x // x ∈ ↑(radical R L) }
Theorem: Fin.card_fintypeIoi
File: Mathlib/Data/Fin/Interval.lean

tactic: rw [Fintype.card_ofFinset, card_Ioi]
state_before: n : ℕ
a b : Fin n
⊢ Fintype.card ↑(Set.Ioi a) = n - 1 - ↑a

tactic: assumption
state_before: case b
n : ℕ
a b : Fin n
⊢ Fin n
Theorem: Filter.mem_iInf_of_directed
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [← Filter.mem_sets, iInf_sets_eq h, mem_iUnion]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.95811
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
inst✝ : Nonempty ι
s : Set α
⊢ s ∈ iInf f ↔ ∃ i, s ∈ f i
Theorem: List.prod_set'
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: refine (prod_set L n a).trans ?_
state_before: ι : Type ?u.120614
α : Type ?u.120617
M : Type ?u.120620
N : Type ?u.120623
P : Type ?u.120626
M₀ : Type ?u.120629
G : Type u_1
R : Type ?u.120635
inst✝ : CommGroup G
L : List G
n : ℕ
a : G
⊢ prod (set L n a) = prod L * if hn : n < length L then (nthLe L n hn)⁻¹ * a else 1

tactic: split_ifs with hn
state_before: ι : Type ?u.120614
α : Type ?u.120617
M : Type ?u.120620
N : Type ?u.120623
P : Type ?u.120626
M₀ : Type ?u.120629
G : Type u_1
R : Type ?u.120635
inst✝ : CommGroup G
L : List G
n : ℕ
a : G
⊢ (prod (take n L) * if n < length L then a else 1) * prod (drop (n + 1) L) =
    prod L * if hn : n < length L then (nthLe L n hn)⁻¹ * a else 1

tactic: rw [mul_comm _ a, mul_assoc a, prod_drop_succ L n hn, mul_comm _ (drop n L).prod, ←
  mul_assoc (take n L).prod, prod_take_mul_prod_drop, mul_comm a, mul_assoc]
state_before: case inl
ι : Type ?u.120614
α : Type ?u.120617
M : Type ?u.120620
N : Type ?u.120623
P : Type ?u.120626
M₀ : Type ?u.120629
G : Type u_1
R : Type ?u.120635
inst✝ : CommGroup G
L : List G
n : ℕ
a : G
hn : n < length L
⊢ prod (take n L) * a * prod (drop (n + 1) L) = prod L * ((nthLe L n hn)⁻¹ * a)

tactic: simp only [take_all_of_le (le_of_not_lt hn), prod_nil, mul_one,
  drop_eq_nil_of_le ((le_of_not_lt hn).trans n.le_succ)]
state_before: case inr
ι : Type ?u.120614
α : Type ?u.120617
M : Type ?u.120620
N : Type ?u.120623
P : Type ?u.120626
M₀ : Type ?u.120629
G : Type u_1
R : Type ?u.120635
inst✝ : CommGroup G
L : List G
n : ℕ
a : G
hn : ¬n < length L
⊢ prod (take n L) * 1 * prod (drop (n + 1) L) = prod L * 1
Theorem: Matrix.blockDiagonal'_smul
File: Mathlib/Data/Matrix/Block.lean

tactic: ext
state_before: l : Type ?u.242028
m : Type ?u.242031
n : Type ?u.242034
o : Type u_5
p : Type ?u.242040
q : Type ?u.242043
m' : o → Type u_3
n' : o → Type u_4
p' : o → Type ?u.242058
R✝ : Type ?u.242061
S : Type ?u.242064
α : Type u_2
β : Type ?u.242070
inst✝³ : DecidableEq o
R : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
⊢ blockDiagonal' (x • M) = x • blockDiagonal' M

tactic: simp only [blockDiagonal'_apply, Pi.smul_apply, smul_apply]
state_before: case a.h
l : Type ?u.242028
m : Type ?u.242031
n : Type ?u.242034
o : Type u_5
p : Type ?u.242040
q : Type ?u.242043
m' : o → Type u_3
n' : o → Type u_4
p' : o → Type ?u.242058
R✝ : Type ?u.242061
S : Type ?u.242064
α : Type u_2
β : Type ?u.242070
inst✝³ : DecidableEq o
R : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
i✝ : (i : o) × m' i
x✝ : (i : o) × n' i
⊢ blockDiagonal' (x • M) i✝ x✝ = (x • blockDiagonal' M) i✝ x✝

tactic: split_ifs <;> simp
state_before: case a.h
l : Type ?u.242028
m : Type ?u.242031
n : Type ?u.242034
o : Type u_5
p : Type ?u.242040
q : Type ?u.242043
m' : o → Type u_3
n' : o → Type u_4
p' : o → Type ?u.242058
R✝ : Type ?u.242061
S : Type ?u.242064
α : Type u_2
β : Type ?u.242070
inst✝³ : DecidableEq o
R : Type u_1
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
i✝ : (i : o) × m' i
x✝ : (i : o) × n' i
⊢ (if h : i✝.fst = x✝.fst then x • M i✝.fst i✝.snd (cast (_ : n' x✝.fst = n' i✝.fst) x✝.snd) else 0) =
    x • if h : i✝.fst = x✝.fst then M i✝.fst i✝.snd (cast (_ : n' x✝.fst = n' i✝.fst) x✝.snd) else 0
Theorem: WithZeroTopology.nhds_zero
File: Mathlib/Topology/Algebra/WithZeroTopology.lean

tactic: rw [nhds_eq_update, update_same]
state_before: α : Type ?u.2495
Γ₀ : Type u_1
inst✝ : LinearOrderedCommGroupWithZero Γ₀
γ γ₁ γ₂ : Γ₀
l : Filter α
f : α → Γ₀
⊢ 𝓝 0 = ⨅ (γ : Γ₀) (_ : γ ≠ 0), 𝓟 (Iio γ)
Theorem: Sum.swap_swap
File: Mathlib/Data/Sum/Basic.lean

tactic: cases x <;> rfl
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.22455
δ : Type ?u.22458
x : α ⊕ β
⊢ swap (swap x) = x
Theorem: LinearEquiv.det_conj
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: rw [← Units.eq_iff, coe_det, coe_det, ← comp_coe, ← comp_coe, LinearMap.det_conj]
state_before: R : Type u_1
inst✝⁶ : CommRing R
M : Type u_2
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
M' : Type u_3
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
ι : Type ?u.1528607
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
e✝ : Basis ι R M
f : M ≃ₗ[R] M
e : M ≃ₗ[R] M'
⊢ ↑LinearEquiv.det (trans (trans (symm e) f) e) = ↑LinearEquiv.det f
Theorem: Nat.lt_factorial_self
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: have : 0 < n := (by decide : 0 < 2).trans (succ_le_iff.mp hi)
state_before: m n✝ n : ℕ
hi : 3 ≤ n
⊢ n < n !

tactic: have : 1 < pred n := le_pred_of_lt (succ_le_iff.mp hi)
state_before: m n✝ n : ℕ
hi : 3 ≤ n
this : 0 < n
⊢ n < n !

tactic: rw [← succ_pred_eq_of_pos ‹0 < n›, factorial_succ]
state_before: m n✝ n : ℕ
hi : 3 ≤ n
this✝ : 0 < n
this : 1 < pred n
⊢ n < n !

tactic: exact
  lt_mul_of_one_lt_right (pred n).succ_pos
    ((‹1 < pred n›).trans_le (self_le_factorial _))
state_before: m n✝ n : ℕ
hi : 3 ≤ n
this✝ : 0 < n
this : 1 < pred n
⊢ succ (pred n) < (pred n + 1) * (pred n)!

tactic: decide
state_before: m n✝ n : ℕ
hi : 3 ≤ n
⊢ 0 < 2
Theorem: LinearMap.finiteDimensional_of_det_ne_one
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: by_cases H : ∃ s : Finset M, Nonempty (Basis s 𝕜 M)
state_before: R : Type ?u.1133378
inst✝¹¹ : CommRing R
M : Type u_2
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
M' : Type ?u.1133969
inst✝⁸ : AddCommGroup M'
inst✝⁷ : Module R M'
ι : Type ?u.1134511
inst✝⁶ : DecidableEq ι
inst✝⁵ : Fintype ι
e : Basis ι R M
A : Type ?u.1134989
inst✝⁴ : CommRing A
inst✝³ : Module A M
κ : Type ?u.1135487
inst✝² : Fintype κ
𝕜 : Type u_1
inst✝¹ : Field 𝕜
inst✝ : Module 𝕜 M
f : M →ₗ[𝕜] M
hf : ↑LinearMap.det f ≠ 1
⊢ FiniteDimensional 𝕜 M

tactic: rcases H with ⟨s, ⟨hs⟩⟩
state_before: case pos
R : Type ?u.1133378
inst✝¹¹ : CommRing R
M : Type u_2
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
M' : Type ?u.1133969
inst✝⁸ : AddCommGroup M'
inst✝⁷ : Module R M'
ι : Type ?u.1134511
inst✝⁶ : DecidableEq ι
inst✝⁵ : Fintype ι
e : Basis ι R M
A : Type ?u.1134989
inst✝⁴ : CommRing A
inst✝³ : Module A M
κ : Type ?u.1135487
inst✝² : Fintype κ
𝕜 : Type u_1
inst✝¹ : Field 𝕜
inst✝ : Module 𝕜 M
f : M →ₗ[𝕜] M
hf : ↑LinearMap.det f ≠ 1
H : ∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 M)
⊢ FiniteDimensional 𝕜 M

tactic: exact FiniteDimensional.of_fintype_basis hs
state_before: case pos.intro.intro
R : Type ?u.1133378
inst✝¹¹ : CommRing R
M : Type u_2
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
M' : Type ?u.1133969
inst✝⁸ : AddCommGroup M'
inst✝⁷ : Module R M'
ι : Type ?u.1134511
inst✝⁶ : DecidableEq ι
inst✝⁵ : Fintype ι
e : Basis ι R M
A : Type ?u.1134989
inst✝⁴ : CommRing A
inst✝³ : Module A M
κ : Type ?u.1135487
inst✝² : Fintype κ
𝕜 : Type u_1
inst✝¹ : Field 𝕜
inst✝ : Module 𝕜 M
f : M →ₗ[𝕜] M
hf : ↑LinearMap.det f ≠ 1
s : Finset M
hs : Basis { x // x ∈ s } 𝕜 M
⊢ FiniteDimensional 𝕜 M

tactic: classical simp [LinearMap.coe_det, H] at hf
state_before: case neg
R : Type ?u.1133378
inst✝¹¹ : CommRing R
M : Type u_2
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
M' : Type ?u.1133969
inst✝⁸ : AddCommGroup M'
inst✝⁷ : Module R M'
ι : Type ?u.1134511
inst✝⁶ : DecidableEq ι
inst✝⁵ : Fintype ι
e : Basis ι R M
A : Type ?u.1134989
inst✝⁴ : CommRing A
inst✝³ : Module A M
κ : Type ?u.1135487
inst✝² : Fintype κ
𝕜 : Type u_1
inst✝¹ : Field 𝕜
inst✝ : Module 𝕜 M
f : M →ₗ[𝕜] M
hf : ↑LinearMap.det f ≠ 1
H : ¬∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 M)
⊢ FiniteDimensional 𝕜 M

tactic: simp [LinearMap.coe_det, H] at hf
state_before: case neg
R : Type ?u.1133378
inst✝¹¹ : CommRing R
M : Type u_2
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
M' : Type ?u.1133969
inst✝⁸ : AddCommGroup M'
inst✝⁷ : Module R M'
ι : Type ?u.1134511
inst✝⁶ : DecidableEq ι
inst✝⁵ : Fintype ι
e : Basis ι R M
A : Type ?u.1134989
inst✝⁴ : CommRing A
inst✝³ : Module A M
κ : Type ?u.1135487
inst✝² : Fintype κ
𝕜 : Type u_1
inst✝¹ : Field 𝕜
inst✝ : Module 𝕜 M
f : M →ₗ[𝕜] M
hf : ↑LinearMap.det f ≠ 1
H : ¬∃ s, Nonempty (Basis { x // x ∈ s } 𝕜 M)
⊢ FiniteDimensional 𝕜 M
Theorem: orderOf_pos_iff
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: rw [iff_not_comm.mp orderOf_eq_zero_iff, pos_iff_ne_zero]
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
⊢ 0 < orderOf x ↔ IsOfFinOrder x
Theorem: Function.LeftInverse.eq_rec_eq
File: Mathlib/Logic/Function/Basic.lean

tactic: rw [h]
state_before: α : Sort u_1
β : Sort u_2
γ : β → Sort v
f : α → β
g : β → α
h : LeftInverse g f
C : (a : α) → γ (f a)
a : α
⊢ HEq (C (g (f a))) (C a)
Theorem: LinearMap.exists_extend
File: Mathlib/LinearAlgebra/Basis.lean

tactic: rw [LinearMap.comp_assoc, hg, f.comp_id]
state_before: ι : Type ?u.1210879
ι' : Type ?u.1210882
R : Type ?u.1210885
R₂ : Type ?u.1210888
K : Type u_1
M : Type ?u.1210894
M' : Type ?u.1210897
M'' : Type ?u.1210900
V : Type u
V' : Type u_2
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v : ι → V
s t : Set V
x y z : V
p : Submodule K V
f : { x // x ∈ p } →ₗ[K] V'
g : V →ₗ[K] { x // x ∈ p }
hg : comp g (Submodule.subtype p) = id
⊢ comp (comp f g) (Submodule.subtype p) = f
Theorem: Filter.hasBasis_pure
File: Mathlib/Order/Filter/Bases.lean

tactic: simp only [← principal_singleton, hasBasis_principal]
state_before: α : Type u_1
β : Type ?u.38932
γ : Type ?u.38935
ι : Sort ?u.38938
ι' : Sort ?u.38941
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
x : α
⊢ HasBasis (pure x) (fun x => True) fun x_1 => {x}
Theorem: Subgroup.commutator_prod_prod
File: Mathlib/GroupTheory/Commutator.lean

tactic: apply le_antisymm
state_before: G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
⊢ ⁅prod H₁ K₁, prod H₂ K₂⁆ = prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆

tactic: rw [commutator_le]
state_before: case a
G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
⊢ ⁅prod H₁ K₁, prod H₂ K₂⁆ ≤ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆

tactic: rintro ⟨p₁, p₂⟩ ⟨hp₁, hp₂⟩ ⟨q₁, q₂⟩ ⟨hq₁, hq₂⟩
state_before: case a
G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
⊢ ∀ (g₁ : G × G'), g₁ ∈ prod H₁ K₁ → ∀ (g₂ : G × G'), g₂ ∈ prod H₂ K₂ → ⁅g₁, g₂⁆ ∈ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆

tactic: exact ⟨commutator_mem_commutator hp₁ hq₁, commutator_mem_commutator hp₂ hq₂⟩
state_before: case a.mk.intro.mk.intro
G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
p₁ : G
p₂ : G'
hp₁ : (p₁, p₂).fst ∈ ↑H₁.toSubmonoid
hp₂ : (p₁, p₂).snd ∈ ↑K₁.toSubmonoid
q₁ : G
q₂ : G'
hq₁ : (q₁, q₂).fst ∈ ↑H₂.toSubmonoid
hq₂ : (q₁, q₂).snd ∈ ↑K₂.toSubmonoid
⊢ ⁅(p₁, p₂), (q₁, q₂)⁆ ∈ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆

tactic: rw [prod_le_iff]
state_before: case a
G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
⊢ prod ⁅H₁, H₂⁆ ⁅K₁, K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆

tactic: rw [map_commutator]
state_before: case a.right
G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
⊢ map (MonoidHom.inr G G') ⁅K₁, K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆

tactic: apply commutator_mono <;>
  simp [le_prod_iff, map_map, MonoidHom.fst_comp_inl, MonoidHom.snd_comp_inl,
    MonoidHom.fst_comp_inr, MonoidHom.snd_comp_inr]
state_before: case a.right
G : Type u_2
G' : Type u_1
F : Type ?u.96044
inst✝² : Group G
inst✝¹ : Group G'
inst✝ : MonoidHomClass F G G'
f : F
g₁ g₂ g₃ g : G
H₁ H₂ H₃ K₁✝ K₂✝ : Subgroup G
K₁ K₂ : Subgroup G'
⊢ ⁅map (MonoidHom.inr G G') K₁, map (MonoidHom.inr G G') K₂⁆ ≤ ⁅prod H₁ K₁, prod H₂ K₂⁆
Theorem: Primrec₂.uncurry
File: Mathlib/Computability/Primrec.lean

tactic: rw [show Function.uncurry f = fun p : α × β => f p.1 p.2 from funext fun ⟨a, b⟩ => rfl]
state_before: α : Type u_2
β : Type u_1
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
f : α → β → σ
⊢ Primrec (Function.uncurry f) ↔ Primrec₂ f

tactic: rfl
state_before: α : Type u_2
β : Type u_1
σ : Type u_3
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
f : α → β → σ
⊢ (Primrec fun p => f p.fst p.snd) ↔ Primrec₂ f