tasksource/leandojo huggingface dataset:
Theorem: Finset.property_of_mem_map_subtype
File: Mathlib/Data/Finset/Image.lean

tactic: rcases mem_map.1 h with ⟨x, _, rfl⟩
state_before: α : Type u_1
β : Type ?u.135235
γ : Type ?u.135238
p : α → Prop
s : Finset { x // p x }
a : α
h : a ∈ map (Embedding.subtype fun x => p x) s
⊢ p a

tactic: exact x.2
state_before: case intro.intro
α : Type u_1
β : Type ?u.135235
γ : Type ?u.135238
p : α → Prop
s : Finset { x // p x }
x : { x // p x }
left✝ : x ∈ s
h : ↑(Embedding.subtype fun x => p x) x ∈ map (Embedding.subtype fun x => p x) s
⊢ p (↑(Embedding.subtype fun x => p x) x)
Theorem: Matrix.adjugate_fin_succ_eq_det_submatrix
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: simp_rw [adjugate_apply, det_succ_row _ j, updateRow_self, submatrix_updateRow_succAbove]
state_before: m : Type u
n✝ : Type v
α : Type w
inst✝⁴ : DecidableEq n✝
inst✝³ : Fintype n✝
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
n : ℕ
A : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) α
i j : Fin (Nat.succ n)
⊢ adjugate A i j = (-1) ^ (↑j + ↑i) * det (submatrix A ↑(Fin.succAbove j) ↑(Fin.succAbove i))

tactic: rw [Fintype.sum_eq_single i fun h hjk => ?_, Pi.single_eq_same, mul_one]
state_before: m : Type u
n✝ : Type v
α : Type w
inst✝⁴ : DecidableEq n✝
inst✝³ : Fintype n✝
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
n : ℕ
A : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) α
i j : Fin (Nat.succ n)
⊢ ∑ x : Fin (Nat.succ n), (-1) ^ (↑j + ↑x) * Pi.single i 1 x * det (submatrix A ↑(Fin.succAbove j) ↑(Fin.succAbove x)) =
    (-1) ^ (↑j + ↑i) * det (submatrix A ↑(Fin.succAbove j) ↑(Fin.succAbove i))

tactic: rw [Pi.single_eq_of_ne hjk, MulZeroClass.mul_zero, MulZeroClass.zero_mul]
state_before: m : Type u
n✝ : Type v
α : Type w
inst✝⁴ : DecidableEq n✝
inst✝³ : Fintype n✝
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
n : ℕ
A : Matrix (Fin (Nat.succ n)) (Fin (Nat.succ n)) α
i j h : Fin (Nat.succ n)
hjk : h ≠ i
⊢ (-1) ^ (↑j + ↑h) * Pi.single i 1 h * det (submatrix A ↑(Fin.succAbove j) ↑(Fin.succAbove h)) = 0
Theorem: List.rotate_mod
File: Mathlib/Data/List/Rotate.lean

tactic: simp [rotate]
state_before: α : Type u
l : List α
n : ℕ
⊢ rotate l (n % length l) = rotate l n
Theorem: gauge_norm_smul
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: unfold gauge
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.160196
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : IsROrC 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
⊢ gauge s (‖r‖ • x) = gauge s (r • x)

tactic: congr with θ
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.160196
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : IsROrC 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
⊢ sInf {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} = sInf {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

tactic: rw [@IsROrC.real_smul_eq_coe_smul 𝕜]
state_before: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type ?u.160196
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : IsROrC 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

tactic: refine' and_congr_right fun hθ => (hs.smul _).mem_smul_iff _
state_before: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type ?u.160196
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : IsROrC 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ↑‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

tactic: rw [IsROrC.norm_ofReal, abs_norm]
state_before: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type ?u.160196
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : IsROrC 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
hθ : 0 < θ
⊢ ‖↑‖r‖‖ = ‖r‖
Theorem: Ordinal.enumOrd_succ_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [enumOrd_def]
state_before: S : Set Ordinal
a b : Ordinal
hS : Unbounded (fun x x_1 => x < x_1) S
ha : a ∈ S
hb : enumOrd S b < a
⊢ enumOrd S (succ b) ≤ a

tactic: exact
  csInf_le' ⟨ha, fun c hc => ((enumOrd_strictMono hS).monotone (le_of_lt_succ hc)).trans_lt hb⟩
state_before: S : Set Ordinal
a b : Ordinal
hS : Unbounded (fun x x_1 => x < x_1) S
ha : a ∈ S
hb : enumOrd S b < a
⊢ sInf (S ∩ {b_1 | ∀ (c : Ordinal), c < succ b → enumOrd S c < b_1}) ≤ a
Theorem: Turing.PartrecToTM2.K'.elim_update_rev
File: Mathlib/Computability/TMToPartrec.lean

tactic: funext x
state_before: a b c d b' : List Γ'
⊢ update (elim a b c d) rev b' = elim a b' c d

tactic: cases x <;> rfl
state_before: case h
a b c d b' : List Γ'
x : K'
⊢ update (elim a b c d) rev b' x = elim a b' c d x
Theorem: DenseInducing.dense_image
File: Mathlib/Topology/DenseEmbedding.lean

tactic: refine' ⟨fun H x => _, di.dense.dense_image di.continuous⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.2172
δ : Type ?u.2175
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
i : α → β
di✝ di : DenseInducing i
s : Set α
⊢ Dense (i '' s) ↔ Dense s

tactic: rw [di.toInducing.closure_eq_preimage_closure_image, H.closure_eq, preimage_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.2172
δ : Type ?u.2175
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
i : α → β
di✝ di : DenseInducing i
s : Set α
H : Dense (i '' s)
x : α
⊢ x ∈ closure s

tactic: trivial
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.2172
δ : Type ?u.2175
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
i : α → β
di✝ di : DenseInducing i
s : Set α
H : Dense (i '' s)
x : α
⊢ x ∈ univ
Theorem: Filter.extraction_forall_of_frequently
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp only [frequently_atTop'] at h
state_before: ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
h : ∀ (n : ℕ), ∃ᶠ (k : ℕ) in atTop, P n k
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P n (φ n)

tactic: choose u hu hu' using h
state_before: ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
h : ∀ (n a : ℕ), ∃ b, b > a ∧ P n b
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P n (φ n)

tactic: use (fun n => Nat.recOn n (u 0 0) fun n v => u (n + 1) v : ℕ → ℕ)
state_before: ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), P n (φ n)

tactic: constructor
state_before: ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
⊢ (StrictMono fun n => Nat.recOn n (u 0 0) fun n v => u (n + 1) v) ∧
    ∀ (n : ℕ), P n ((fun n => Nat.recOn n (u 0 0) fun n v => u (n + 1) v) n)

tactic: apply strictMono_nat_of_lt_succ
state_before: case left
ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
⊢ StrictMono fun n => Nat.recOn n (u 0 0) fun n v => u (n + 1) v

tactic: intro n
state_before: case left.hf
ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
⊢ ∀ (n : ℕ), (Nat.recOn n (u 0 0) fun n v => u (n + 1) v) < Nat.recOn (n + 1) (u 0 0) fun n v => u (n + 1) v

tactic: apply hu
state_before: case left.hf
ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
n : ℕ
⊢ (Nat.recOn n (u 0 0) fun n v => u (n + 1) v) < Nat.recOn (n + 1) (u 0 0) fun n v => u (n + 1) v

tactic: intro n
state_before: case right
ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
⊢ ∀ (n : ℕ), P n ((fun n => Nat.recOn n (u 0 0) fun n v => u (n + 1) v) n)

tactic: cases n <;> simp [hu']
state_before: case right
ι : Type ?u.59096
ι' : Type ?u.59099
α : Type ?u.59102
β : Type ?u.59105
γ : Type ?u.59108
P : ℕ → ℕ → Prop
u : ℕ → ℕ → ℕ
hu : ∀ (n a : ℕ), u n a > a
hu' : ∀ (n a : ℕ), P n (u n a)
n : ℕ
⊢ P n ((fun n => Nat.recOn n (u 0 0) fun n v => u (n + 1) v) n)
Theorem: inv_pow_sub_of_lt
File: Mathlib/Algebra/GroupWithZero/Power.lean

tactic: rw [pow_sub_of_lt a⁻¹ h, inv_pow, inv_pow, inv_inv]
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
a✝ : G₀
m n : ℕ
a : G₀
h : n < m
⊢ a⁻¹ ^ (m - n) = (a ^ m)⁻¹ * a ^ n
Theorem: LipschitzWith.edist_iterate_succ_le_geometric
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: rw [iterate_succ, mul_comm]
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
x✝ y : α
r : ℝ≥0∞
f : α → α
hf : LipschitzWith K f
x : α
n : ℕ
⊢ edist ((f^[n]) x) ((f^[n + 1]) x) ≤ edist x (f x) * ↑K ^ n

tactic: simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f✝ : α → β
x✝ y : α
r : ℝ≥0∞
f : α → α
hf : LipschitzWith K f
x : α
n : ℕ
⊢ edist ((f^[n]) x) ((f^[n] ∘ f) x) ≤ ↑K ^ n * edist x (f x)
Theorem: Quotient.finChoice_eq
File: Mathlib/Data/Fintype/Quotient.lean

tactic: dsimp only [Quotient.finChoice]
state_before: ι : Type u_1
inst✝² : DecidableEq ι
inst✝¹ : Fintype ι
α : ι → Type u_2
inst✝ : (i : ι) → Setoid (α i)
f : (i : ι) → α i
⊢ (finChoice fun i => Quotient.mk (inst✝ i) (f i)) = Quotient.mk inferInstance f

tactic: conv_lhs =>
  enter [1]
  tactic =>
    change _ = ⟦fun i _ => f i⟧
    exact Quotient.inductionOn (@Finset.univ ι _).1 fun l => Quotient.finChoiceAux_eq _ _
state_before: ι : Type u_1
inst✝² : DecidableEq ι
inst✝¹ : Fintype ι
α : ι → Type u_2
inst✝ : (i : ι) → Setoid (α i)
f : (i : ι) → α i
⊢ Quotient.liftOn
      (Quotient.recOn Finset.univ.val (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i))
        (_ :
          ∀ (a b : List ι) (h : a ≈ b),
            (_ : Quotient.mk (List.isSetoid ι) a = Quotient.mk (List.isSetoid ι) b) ▸
                (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i)) a =
              (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i)) b))
      (fun f => Quotient.mk inferInstance fun i => f i (_ : i ∈ Finset.univ))
      (_ :
        ∀ (a b : (i : ι) → i ∈ Finset.univ.val → α i),
          a ≈ b →
            (Quotient.mk inferInstance fun i => a i (_ : i ∈ Finset.univ)) =
              Quotient.mk inferInstance fun i => b i (_ : i ∈ Finset.univ)) =
    Quotient.mk inferInstance f

tactic: change _ = ⟦fun i _ => f i⟧
state_before: ι : Type u_1
inst✝² : DecidableEq ι
inst✝¹ : Fintype ι
α : ι → Type u_2
inst✝ : (i : ι) → Setoid (α i)
f : (i : ι) → α i
⊢ Quotient.recOn Finset.univ.val (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i))
      (_ :
        ∀ (a b : List ι) (h : a ≈ b),
          (_ : Quotient.mk (List.isSetoid ι) a = Quotient.mk (List.isSetoid ι) b) ▸
              (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i)) a =
            (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i)) b) =
    ?m.24194

tactic: exact Quotient.inductionOn (@Finset.univ ι _).1 fun l => Quotient.finChoiceAux_eq _ _
state_before: ι : Type u_1
inst✝² : DecidableEq ι
inst✝¹ : Fintype ι
α : ι → Type u_2
inst✝ : (i : ι) → Setoid (α i)
f : (i : ι) → α i
⊢ Quotient.recOn Finset.univ.val (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i))
      (_ :
        ∀ (a b : List ι) (h : a ≈ b),
          (_ : Quotient.mk (List.isSetoid ι) a = Quotient.mk (List.isSetoid ι) b) ▸
              (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i)) a =
            (fun l => finChoiceAux l fun i x => Quotient.mk (inst✝ i) (f i)) b) =
    Quotient.mk inferInstance fun i x => f i
Theorem: Ordinal.div_self
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa only [mul_one] using mul_div_cancel 1 h
state_before: α : Type ?u.245499
β : Type ?u.245502
γ : Type ?u.245505
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a : Ordinal
h : a ≠ 0
⊢ a / a = 1
Theorem: isAlgebraic_of_larger_base_of_injective
File: Mathlib/RingTheory/Algebraic.lean

tactic: rwa [Ne.def, ← degree_eq_bot, degree_map_eq_of_injective hinj, degree_eq_bot]
state_before: K : Type ?u.261453
L : Type ?u.261456
R : Type u_1
S : Type u_2
A : Type u_3
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : CommRing A
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra L A
inst✝⁵ : Algebra K A
inst✝⁴ : IsScalarTower K L A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R S A
hinj : Function.Injective ↑(algebraMap R S)
x : A
A_alg : _root_.IsAlgebraic R x
p : R[X]
hp₁ : p ≠ 0
hp₂ : ↑(aeval x) p = 0
⊢ map (algebraMap R S) p ≠ 0

tactic: simpa
state_before: K : Type ?u.261453
L : Type ?u.261456
R : Type u_1
S : Type u_2
A : Type u_3
inst✝¹² : Field K
inst✝¹¹ : Field L
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : CommRing A
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra L A
inst✝⁵ : Algebra K A
inst✝⁴ : IsScalarTower K L A
inst✝³ : Algebra R S
inst✝² : Algebra S A
inst✝¹ : Algebra R A
inst✝ : IsScalarTower R S A
hinj : Function.Injective ↑(algebraMap R S)
x : A
A_alg : _root_.IsAlgebraic R x
p : R[X]
hp₁ : p ≠ 0
hp₂ : ↑(aeval x) p = 0
⊢ ↑(aeval x) (map (algebraMap R S) p) = 0
Theorem: Real.sSup_nonneg
File: Mathlib/Data/Real/Basic.lean

tactic: rcases S.eq_empty_or_nonempty with (rfl | ⟨y, hy⟩)
state_before: x y : ℝ
S : Set ℝ
hS : ∀ (x : ℝ), x ∈ S → 0 ≤ x
⊢ 0 ≤ sSup S

tactic: exact sSup_empty.ge
state_before: case inl
x y : ℝ
hS : ∀ (x : ℝ), x ∈ ∅ → 0 ≤ x
⊢ 0 ≤ sSup ∅

tactic: apply dite _ (fun h => le_csSup_of_le h hy <| hS y hy) fun h => (sSup_of_not_bddAbove h).ge
state_before: case inr.intro
x y✝ : ℝ
S : Set ℝ
hS : ∀ (x : ℝ), x ∈ S → 0 ≤ x
y : ℝ
hy : y ∈ S
⊢ 0 ≤ sSup S
Theorem: Matrix.cramer_transpose_row_self
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: ext j
state_before: m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i : n
⊢ ↑(cramer Aᵀ) (A i) = Pi.single i (det A)

tactic: rw [cramer_apply, Pi.single_apply]
state_before: case h
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i j : n
⊢ ↑(cramer Aᵀ) (A i) j = Pi.single i (det A) j

tactic: split_ifs with h
state_before: case h
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i j : n
⊢ det (updateColumn Aᵀ j (A i)) = if j = i then det A else 0

tactic: subst h
state_before: case h.inl
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i j : n
h : j = i
⊢ det (updateColumn Aᵀ j (A i)) = det A

tactic: simp only [updateColumn_transpose, det_transpose, updateRow_eq_self]
state_before: case h.inl
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
j : n
⊢ det (updateColumn Aᵀ j (A j)) = det A

tactic: rw [updateColumn_transpose, det_transpose]
state_before: case h.inr
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i j : n
h : ¬j = i
⊢ det (updateColumn Aᵀ j (A i)) = 0

tactic: apply det_zero_of_row_eq h
state_before: case h.inr
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i j : n
h : ¬j = i
⊢ det (updateRow A j (A i)) = 0

tactic: rw [updateRow_self, updateRow_ne (Ne.symm h)]
state_before: case h.inr
m : Type u
n : Type v
α : Type w
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
inst✝ : CommRing α
A : Matrix n n α
b : n → α
i j : n
h : ¬j = i
⊢ updateRow A j (A i) j = updateRow A j (A i) i
Theorem: GeneralizedContinuedFraction.IntFractPair.succ_nth_stream_eq_some_iff
File: Mathlib/Algebra/ContinuedFractions/Computation/Translations.lean

tactic: simp [IntFractPair.stream, ite_eq_iff]
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
ifp_succ_n : IntFractPair K
⊢ IntFractPair.stream v (n + 1) = some ifp_succ_n ↔
    ∃ ifp_n, IntFractPair.stream v n = some ifp_n ∧ ifp_n.fr ≠ 0 ∧ IntFractPair.of ifp_n.fr⁻¹ = ifp_succ_n
Theorem: Set.preimage_sub_const_uIcc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [sub_eq_add_neg]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ (fun x => x - a) ⁻¹' [[b, c]] = [[b + a, c + a]]
Theorem: Lagrange.natDegree_basis
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: have H : ∀ j, j ∈ s.erase i → basisDivisor (v i) (v j) ≠ 0 := by
  simp_rw [Ne.def, mem_erase, basisDivisor_eq_zero_iff]
  exact fun j ⟨hij₁, hj⟩ hij₂ => hij₁ (hvs hj hi hij₂.symm)
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
⊢ natDegree (Lagrange.basis s v i) = card s - 1

tactic: rw [← card_erase_of_mem hi, card_eq_sum_ones]
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
H : ∀ (j : ι), j ∈ Finset.erase s i → basisDivisor (v i) (v j) ≠ 0
⊢ natDegree (Lagrange.basis s v i) = card s - 1

tactic: convert natDegree_prod _ _ H using 1
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
H : ∀ (j : ι), j ∈ Finset.erase s i → basisDivisor (v i) (v j) ≠ 0
⊢ natDegree (Lagrange.basis s v i) = ∑ x in Finset.erase s i, 1

tactic: refine' sum_congr rfl fun j hj => (natDegree_basisDivisor_of_ne _).symm
state_before: case h.e'_3
F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
H : ∀ (j : ι), j ∈ Finset.erase s i → basisDivisor (v i) (v j) ≠ 0
⊢ ∑ x in Finset.erase s i, 1 = ∑ i_1 in Finset.erase s i, natDegree (basisDivisor (v i) (v i_1))

tactic: rw [Ne.def, ← basisDivisor_eq_zero_iff]
state_before: case h.e'_3
F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j✝ : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
H : ∀ (j : ι), j ∈ Finset.erase s i → basisDivisor (v i) (v j) ≠ 0
j : ι
hj : j ∈ Finset.erase s i
⊢ v i ≠ v j

tactic: exact H _ hj
state_before: case h.e'_3
F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j✝ : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
H : ∀ (j : ι), j ∈ Finset.erase s i → basisDivisor (v i) (v j) ≠ 0
j : ι
hj : j ∈ Finset.erase s i
⊢ ¬basisDivisor (v i) (v j) = 0

tactic: simp_rw [Ne.def, mem_erase, basisDivisor_eq_zero_iff]
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
⊢ ∀ (j : ι), j ∈ Finset.erase s i → basisDivisor (v i) (v j) ≠ 0

tactic: exact fun j ⟨hij₁, hj⟩ hij₂ => hij₁ (hvs hj hi hij₂.symm)
state_before: F : Type u_2
inst✝¹ : Field F
ι : Type u_1
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
⊢ ∀ (j : ι), j ≠ i ∧ j ∈ s → ¬v i = v j
Theorem: Set.Finite.card_toFinset
File: Mathlib/Data/Set/Finite.lean

tactic: rw [← Finset.card_attach, Finset.attach_eq_univ, ← Fintype.card]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
inst✝ : Fintype ↑s
h : Set.Finite s
⊢ Finset.card (Finite.toFinset h) = Fintype.card ↑s

tactic: refine' Fintype.card_congr (Equiv.setCongr _)
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
inst✝ : Fintype ↑s
h : Set.Finite s
⊢ Fintype.card { x // x ∈ Finite.toFinset h } = Fintype.card ↑s

tactic: ext x
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
inst✝ : Fintype ↑s
h : Set.Finite s
⊢ (fun x => x ∈ (Finite.toFinset h).val) = s

tactic: show x ∈ h.toFinset ↔ x ∈ s
state_before: case h
α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
inst✝ : Fintype ↑s
h : Set.Finite s
x : α
⊢ (x ∈ fun x => x ∈ (Finite.toFinset h).val) ↔ x ∈ s

tactic: simp
state_before: case h
α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
inst✝ : Fintype ↑s
h : Set.Finite s
x : α
⊢ x ∈ Finite.toFinset h ↔ x ∈ s
Theorem: Rat.sub.aux
File: Std/Data/Rat/Basic.lean

tactic: have := add.aux a (-b) hg had hbd
state_before: a b : Rat
g ad bd : Nat
hg : g = Nat.gcd a.den b.den
had : ad = a.den / g
hbd : bd = b.den / g
⊢ let den := ad * b.den;
  let num := a.num * ↑bd - b.num * ↑ad;
  Nat.gcd (Int.natAbs num) g = Nat.gcd (Int.natAbs num) den

tactic: simp only [show (-b).num = -b.num from rfl, Int.neg_mul] at this
state_before: a b : Rat
g ad bd : Nat
hg : g = Nat.gcd a.den b.den
had : ad = a.den / g
hbd : bd = b.den / g
this :
  let den := ad * (-b).den;
  let num := a.num * ↑bd + (-b).num * ↑ad;
  Nat.gcd (Int.natAbs num) g = Nat.gcd (Int.natAbs num) den
⊢ let den := ad * b.den;
  let num := a.num * ↑bd - b.num * ↑ad;
  Nat.gcd (Int.natAbs num) g = Nat.gcd (Int.natAbs num) den

tactic: exact this
state_before: a b : Rat
g ad bd : Nat
hg : g = Nat.gcd a.den b.den
had : ad = a.den / g
hbd : bd = b.den / g
this :
  Nat.gcd (Int.natAbs (a.num * ↑bd + -(b.num * ↑ad))) g =
    Nat.gcd (Int.natAbs (a.num * ↑bd + -(b.num * ↑ad))) (ad * (-b).den)
⊢ let den := ad * b.den;
  let num := a.num * ↑bd - b.num * ↑ad;
  Nat.gcd (Int.natAbs num) g = Nat.gcd (Int.natAbs num) den
Theorem: ZFSet.eq_empty
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: rw [ext_iff]
state_before: x : ZFSet
⊢ x = ∅ ↔ ∀ (y : ZFSet), ¬y ∈ x

tactic: simp
state_before: x : ZFSet
⊢ (∀ (z : ZFSet), z ∈ x ↔ z ∈ ∅) ↔ ∀ (y : ZFSet), ¬y ∈ x
Theorem: div_mul_eq_mul_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.40092
G : Type ?u.40095
inst✝ : DivisionCommMonoid α
a b c d : α
⊢ a / b * c = a * c / b