tasksource/leandojo huggingface dataset:
Theorem: BilinForm.span_singleton_sup_orthogonal_eq_top
File: Mathlib/LinearAlgebra/BilinearForm.lean

tactic: rw [orthogonal_span_singleton_eq_toLin_ker]
state_before: R : Type ?u.1321214
M : Type ?u.1321217
inst✝¹⁴ : Semiring R
inst✝¹³ : AddCommMonoid M
inst✝¹² : Module R M
R₁ : Type ?u.1321253
M₁ : Type ?u.1321256
inst✝¹¹ : Ring R₁
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : Module R₁ M₁
R₂ : Type ?u.1321865
M₂ : Type ?u.1321868
inst✝⁸ : CommSemiring R₂
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Module R₂ M₂
R₃ : Type ?u.1322055
M₃ : Type ?u.1322058
inst✝⁵ : CommRing R₃
inst✝⁴ : AddCommGroup M₃
inst✝³ : Module R₃ M₃
V : Type u_2
K : Type u_1
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
N L : Submodule R M
B : BilinForm K V
x : V
hx : ¬IsOrtho B x x
⊢ Submodule.span K {x} ⊔ orthogonal B (Submodule.span K {x}) = ⊤

tactic: exact LinearMap.span_singleton_sup_ker_eq_top _ hx
state_before: R : Type ?u.1321214
M : Type ?u.1321217
inst✝¹⁴ : Semiring R
inst✝¹³ : AddCommMonoid M
inst✝¹² : Module R M
R₁ : Type ?u.1321253
M₁ : Type ?u.1321256
inst✝¹¹ : Ring R₁
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : Module R₁ M₁
R₂ : Type ?u.1321865
M₂ : Type ?u.1321868
inst✝⁸ : CommSemiring R₂
inst✝⁷ : AddCommMonoid M₂
inst✝⁶ : Module R₂ M₂
R₃ : Type ?u.1322055
M₃ : Type ?u.1322058
inst✝⁵ : CommRing R₃
inst✝⁴ : AddCommGroup M₃
inst✝³ : Module R₃ M₃
V : Type u_2
K : Type u_1
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
N L : Submodule R M
B : BilinForm K V
x : V
hx : ¬IsOrtho B x x
⊢ Submodule.span K {x} ⊔ LinearMap.ker (↑(↑toLin B) x) = ⊤
Theorem: Finsupp.prod_toMultiset
File: Mathlib/Data/Finsupp/Multiset.lean

tactic: refine' f.induction _ _
state_before: α : Type u_1
β : Type ?u.29111
ι : Type ?u.29114
inst✝ : CommMonoid α
f : α →₀ ℕ
⊢ Multiset.prod (↑toMultiset f) = prod f fun a n => a ^ n

tactic: rw [toMultiset_zero, Multiset.prod_zero, Finsupp.prod_zero_index]
state_before: case refine'_1
α : Type u_1
β : Type ?u.29111
ι : Type ?u.29114
inst✝ : CommMonoid α
f : α →₀ ℕ
⊢ Multiset.prod (↑toMultiset 0) = prod 0 fun a n => a ^ n

tactic: intro a n f _ _ ih
state_before: case refine'_2
α : Type u_1
β : Type ?u.29111
ι : Type ?u.29114
inst✝ : CommMonoid α
f : α →₀ ℕ
⊢ ∀ (a : α) (b : ℕ) (f : α →₀ ℕ),
    ¬a ∈ f.support →
      b ≠ 0 →
        (Multiset.prod (↑toMultiset f) = prod f fun a n => a ^ n) →
          Multiset.prod (↑toMultiset (single a b + f)) = prod (single a b + f) fun a n => a ^ n

tactic: rw [toMultiset_add, Multiset.prod_add, ih, toMultiset_single, Multiset.prod_nsmul,
  Finsupp.prod_add_index' pow_zero pow_add, Finsupp.prod_single_index, Multiset.prod_singleton]
state_before: case refine'_2
α : Type u_1
β : Type ?u.29111
ι : Type ?u.29114
inst✝ : CommMonoid α
f✝ : α →₀ ℕ
a : α
n : ℕ
f : α →₀ ℕ
a✝¹ : ¬a ∈ f.support
a✝ : n ≠ 0
ih : Multiset.prod (↑toMultiset f) = prod f fun a n => a ^ n
⊢ Multiset.prod (↑toMultiset (single a n + f)) = prod (single a n + f) fun a n => a ^ n

tactic: exact pow_zero a
state_before: case refine'_2
α : Type u_1
β : Type ?u.29111
ι : Type ?u.29114
inst✝ : CommMonoid α
f✝ : α →₀ ℕ
a : α
n : ℕ
f : α →₀ ℕ
a✝¹ : ¬a ∈ f.support
a✝ : n ≠ 0
ih : Multiset.prod (↑toMultiset f) = prod f fun a n => a ^ n
⊢ a ^ 0 = 1
Theorem: FirstOrder.Language.BoundedFormula.realize_alls
File: Mathlib/ModelTheory/Semantics.lean

tactic: induction' n with n ih
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.635929
P : Type ?u.635932
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n : ℕ
T : Theory L
φ : BoundedFormula L α n
v : α → M
⊢ Formula.Realize (alls φ) v ↔ ∀ (xs : Fin n → M), Realize φ v xs

tactic: exact Unique.forall_iff.symm
state_before: case zero
L : Language
L' : Language
M : Type w
N : Type ?u.635929
P : Type ?u.635932
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n : ℕ
T : Theory L
φ✝ : BoundedFormula L α n
v : α → M
φ : BoundedFormula L α Nat.zero
⊢ Formula.Realize (alls φ) v ↔ ∀ (xs : Fin Nat.zero → M), Realize φ v xs

tactic: simp only [alls, ih, Realize]
state_before: case succ
L : Language
L' : Language
M : Type w
N : Type ?u.635929
P : Type ?u.635932
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n✝ : ℕ
T : Theory L
φ✝ : BoundedFormula L α n✝
v : α → M
n : ℕ
ih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (alls φ) v ↔ ∀ (xs : Fin n → M), Realize φ v xs
φ : BoundedFormula L α (Nat.succ n)
⊢ Formula.Realize (alls φ) v ↔ ∀ (xs : Fin (Nat.succ n) → M), Realize φ v xs

tactic: exact ⟨fun h xs => Fin.snoc_init_self xs ▸ h _ _, fun h xs x => h (Fin.snoc xs x)⟩
state_before: case succ
L : Language
L' : Language
M : Type w
N : Type ?u.635929
P : Type ?u.635932
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n✝ : ℕ
T : Theory L
φ✝ : BoundedFormula L α n✝
v : α → M
n : ℕ
ih : ∀ {φ : BoundedFormula L α n}, Formula.Realize (alls φ) v ↔ ∀ (xs : Fin n → M), Realize φ v xs
φ : BoundedFormula L α (Nat.succ n)
⊢ (∀ (xs : Fin n → M) (x : M), Realize φ v (snoc xs x)) ↔ ∀ (xs : Fin (Nat.succ n) → M), Realize φ v xs
Theorem: Nat.two_mul_div_two_add_one_of_odd
File: Mathlib/Data/Nat/Parity.lean

tactic: rw [← odd_iff.mp h, div_add_mod]
state_before: m n : ℕ
h : Odd n
⊢ 2 * (n / 2) + 1 = n
Theorem: Finset.Nonempty.smul_zero
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simpa [mem_smul] using hs
state_before: F : Type ?u.917819
α : Type u_1
β : Type u_2
γ : Type ?u.917828
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMulWithZero α β
inst✝ : DecidableEq β
s : Finset α
t : Finset β
hs : Finset.Nonempty s
⊢ 0 ⊆ s • 0
Theorem: Finsupp.mem_span_image_iff_total
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [span_image_eq_map_total]
state_before: α : Type u_1
M : Type u_2
N : Type ?u.390066
P : Type ?u.390069
R : Type u_3
S : Type ?u.390075
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.390167
M' : Type ?u.390170
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Set α
x : M
⊢ x ∈ span R (v '' s) ↔ ∃ l, l ∈ supported R R s ∧ ↑(Finsupp.total α M R v) l = x

tactic: simp
state_before: α : Type u_1
M : Type u_2
N : Type ?u.390066
P : Type ?u.390069
R : Type u_3
S : Type ?u.390075
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.390167
M' : Type ?u.390170
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Set α
x : M
⊢ x ∈ map (Finsupp.total α M R v) (supported R R s) ↔ ∃ l, l ∈ supported R R s ∧ ↑(Finsupp.total α M R v) l = x
Theorem: implies_congr'
File: Mathlib/Tactic/Congr!.lean

tactic: cases h
state_before: α α' : Sort u
β β' : Sort v
h : α = α'
h' : α' → β = β'
⊢ (α → β) = (α' → β')

tactic: show (∀ (x : α), (fun _ => β) x) = _
state_before: case refl
α : Sort u
β β' : Sort v
h' : α → β = β'
⊢ (α → β) = (α → β')

tactic: rw [funext h']
state_before: case refl
α : Sort u
β β' : Sort v
h' : α → β = β'
⊢ ((x : α) → (fun x => β) x) = (α → β')
Theorem: contDiff_iff_forall_nat_le
File: Mathlib/Analysis/Calculus/ContDiffDef.lean

tactic: simp_rw [← contDiffOn_univ]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ ContDiff 𝕜 n f ↔ ∀ (m : ℕ), ↑m ≤ n → ContDiff 𝕜 (↑m) f

tactic: exact contDiffOn_iff_forall_nat_le
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
⊢ ContDiffOn 𝕜 n f univ ↔ ∀ (m : ℕ), ↑m ≤ n → ContDiffOn 𝕜 (↑m) f univ
Theorem: ZMod.int_cast_mod
File: Mathlib/Data/ZMod/Basic.lean

tactic: rw [ZMod.int_cast_eq_int_cast_iff]
state_before: a : ℤ
b : ℕ
⊢ ↑(a % ↑b) = ↑a

tactic: apply Int.mod_modEq
state_before: a : ℤ
b : ℕ
⊢ a % ↑b ≡ a [ZMOD ↑b]
Theorem: nhdsWithin_Ici_eq'
File: Mathlib/Topology/Order/Basic.lean

tactic: simp only [nhdsWithin_Ici_eq'', biInf_inf ha, inf_principal, Iio_inter_Ici]
state_before: α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : Preorder α
inst✝ : OrderTopology α
a : α
ha : ∃ u, a < u
⊢ 𝓝[Ici a] a = ⨅ (u : α) (_ : a < u), 𝓟 (Ico a u)
Theorem: Nat.add_div
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [← mul_right_inj' hc0.ne', ← @add_left_cancel_iff _ _ _ ((a + b) % c + a % c + b % c)]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
⊢ (a + b) / c = a / c + b / c + if c ≤ a % c + b % c then 1 else 0

tactic: suffices
  (a + b) % c + c * ((a + b) / c) + a % c + b % c =
    (a % c + c * (a / c) + (b % c + c * (b / c)) + c * if c ≤ a % c + b % c then 1 else 0) +
      (a + b) % c
  by simpa only [mul_add, add_comm, add_left_comm, add_assoc]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
⊢ (a + b) % c + a % c + b % c + c * ((a + b) / c) =
    (a + b) % c + a % c + b % c + c * (a / c + b / c + if c ≤ a % c + b % c then 1 else 0)

tactic: rw [mod_add_div, mod_add_div, mod_add_div, mul_ite, add_assoc, add_assoc]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
⊢ (a + b) % c + c * ((a + b) / c) + a % c + b % c =
    (a % c + c * (a / c) + (b % c + c * (b / c)) + c * if c ≤ a % c + b % c then 1 else 0) + (a + b) % c

tactic: conv_lhs => rw [← add_mod_add_ite]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
⊢ a + (b + (a % c + b % c)) = (a + b + if c ≤ a % c + b % c then c * 1 else c * 0) + (a + b) % c

tactic: simp
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
⊢ a + (b + ((a + b) % c + if c ≤ a % c + b % c then c else 0)) =
    (a + b + if c ≤ a % c + b % c then c * 1 else c * 0) + (a + b) % c

tactic: ac_rfl
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
⊢ a + (b + ((a + b) % c + if c ≤ a % c + b % c then c else 0)) =
    (a + b + if c ≤ a % c + b % c then c else 0) + (a + b) % c

tactic: simpa only [mul_add, add_comm, add_left_comm, add_assoc]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : 0 < c
this :
  (a + b) % c + c * ((a + b) / c) + a % c + b % c =
    (a % c + c * (a / c) + (b % c + c * (b / c)) + c * if c ≤ a % c + b % c then 1 else 0) + (a + b) % c
⊢ (a + b) % c + a % c + b % c + c * ((a + b) / c) =
    (a + b) % c + a % c + b % c + c * (a / c + b / c + if c ≤ a % c + b % c then 1 else 0)
Theorem: IsROrC.ratCast_re
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [← ofReal_ratCast, ofReal_re]
state_before: K : Type u_1
E : Type ?u.6514218
inst✝ : IsROrC K
q : ℚ
⊢ ↑re ↑q = ↑q
Theorem: Finset.Nat.antidiagonal_succ
File: Mathlib/Data/Finset/NatAntidiagonal.lean

tactic: simp
state_before: n : ℕ
⊢ ¬(0, n + 1) ∈
      map (Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Function.Embedding.refl ℕ))
        (antidiagonal n)

tactic: apply eq_of_veq
state_before: n : ℕ
⊢ antidiagonal (n + 1) =
    cons (0, n + 1)
      (map (Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Function.Embedding.refl ℕ))
        (antidiagonal n))
      (_ :
        ¬(0, n + 1) ∈
            map
              (Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Function.Embedding.refl ℕ))
              (antidiagonal n))

tactic: rw [cons_val, map_val]
state_before: case a
n : ℕ
⊢ (antidiagonal (n + 1)).val =
    (cons (0, n + 1)
        (map (Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Function.Embedding.refl ℕ))
          (antidiagonal n))
        (_ :
          ¬(0, n + 1) ∈
              map
                (Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective }
                  (Function.Embedding.refl ℕ))
                (antidiagonal n))).val

tactic: apply Multiset.Nat.antidiagonal_succ
state_before: case a
n : ℕ
⊢ (antidiagonal (n + 1)).val =
    (0, n + 1) ::ₘ
      Multiset.map
        (↑(Function.Embedding.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective } (Function.Embedding.refl ℕ)))
        (antidiagonal n).val
Theorem: Nat.preimage_Icc
File: Mathlib/Algebra/Order/Floor.lean

tactic: ext
state_before: F : Type ?u.69367
α : Type u_1
β : Type ?u.69373
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
hb : 0 ≤ b
⊢ Nat.cast ⁻¹' Icc a b = Icc ⌈a⌉₊ ⌊b⌋₊

tactic: simp [ceil_le, hb, le_floor_iff]
state_before: case h
F : Type ?u.69367
α : Type u_1
β : Type ?u.69373
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
hb : 0 ≤ b
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Icc a b ↔ x✝ ∈ Icc ⌈a⌉₊ ⌊b⌋₊
Theorem: Set.Ioo_add_bij
File: Mathlib/Data/Set/Intervals/Monoid.lean

tactic: rw [← Ioi_inter_Iio, ← Ioi_inter_Iio]
state_before: M : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid M
inst✝ : ExistsAddOfLE M
a b c d : M
⊢ BijOn (fun x => x + d) (Ioo a b) (Ioo (a + d) (b + d))

tactic: exact
  (Ioi_add_bij a d).inter_mapsTo (fun x hx => add_lt_add_right hx _) fun x hx =>
    lt_of_add_lt_add_right hx.2
state_before: M : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid M
inst✝ : ExistsAddOfLE M
a b c d : M
⊢ BijOn (fun x => x + d) (Ioi a ∩ Iio b) (Ioi (a + d) ∩ Iio (b + d))
Theorem: YoungDiagram.col_eq_prod
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

tactic: ext ⟨a, b⟩
state_before: μ : YoungDiagram
j : ℕ
⊢ col μ j = Finset.range (colLen μ j) ×ˢ {j}

tactic: simp only [Finset.mem_product, Finset.mem_singleton, Finset.mem_range, mem_col_iff,
  mem_iff_lt_colLen, and_comm, and_congr_right_iff]
state_before: case a.mk
μ : YoungDiagram
j a b : ℕ
⊢ (a, b) ∈ col μ j ↔ (a, b) ∈ Finset.range (colLen μ j) ×ˢ {j}

tactic: rintro rfl
state_before: case a.mk
μ : YoungDiagram
j a b : ℕ
⊢ b = j → (a < colLen μ b ↔ a < colLen μ j)

tactic: rfl
state_before: case a.mk
μ : YoungDiagram
a b : ℕ
⊢ a < colLen μ b ↔ a < colLen μ b
Theorem: Commensurable.commensurable_inv
File: Mathlib/GroupTheory/Commensurable.lean

tactic: rw [commensurable_conj, inv_smul_smul]
state_before: G : Type u_1
inst✝ : Group G
H : Subgroup G
g : ConjAct G
⊢ Commensurable (g • H) H ↔ Commensurable H (g⁻¹ • H)
Theorem: Subgroup.card_dvd_of_surjective
File: Mathlib/GroupTheory/Index.lean

tactic: simp only [← Nat.card_eq_fintype_card, nat_card_dvd_of_surjective f hf]
state_before: G✝ : Type ?u.118962
inst✝⁴ : Group G✝
H✝ K L : Subgroup G✝
G : Type u_1
H : Type u_2
inst✝³ : Group G
inst✝² : Group H
inst✝¹ : Fintype G
inst✝ : Fintype H
f : G →* H
hf : Function.Surjective ↑f
⊢ Fintype.card H ∣ Fintype.card G
Theorem: Filter.eventually_all_finite
File: Mathlib/Order/Filter/Basic.lean

tactic: simpa only [Filter.Eventually, setOf_forall] using biInter_mem hI
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.142957
ι✝ : Sort x
ι : Type u_1
I : Set ι
hI : Set.Finite I
l : Filter α
p : ι → α → Prop
⊢ (∀ᶠ (x : α) in l, ∀ (i : ι), i ∈ I → p i x) ↔ ∀ (i : ι), i ∈ I → ∀ᶠ (x : α) in l, p i x
Theorem: ciSup_div
File: Mathlib/Algebra/Bounds.lean

tactic: simp only [div_eq_mul_inv, ciSup_mul hf]
state_before: ι : Type u_2
G : Type u_1
inst✝³ : Group G
inst✝² : ConditionallyCompleteLattice G
inst✝¹ : CovariantClass G G (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : Nonempty ι
f : ι → G
hf : BddAbove (range f)
a : G
⊢ (⨆ (i : ι), f i) / a = ⨆ (i : ι), f i / a
Theorem: lcm_dvd_iff
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: by_cases h : a = 0 ∨ b = 0
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b c : α
⊢ lcm a b ∣ c ↔ a ∣ c ∧ b ∣ c

tactic: rcases h with (rfl | rfl) <;>
  simp (config := { contextual := true }) only [iff_def, lcm_zero_left, lcm_zero_right,
    zero_dvd_iff, dvd_zero, eq_self_iff_true, and_true_iff, imp_true_iff]
state_before: case pos
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b c : α
h : a = 0 ∨ b = 0
⊢ lcm a b ∣ c ↔ a ∣ c ∧ b ∣ c

tactic: obtain ⟨h1, h2⟩ := not_or.1 h
state_before: case neg
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b c : α
h : ¬(a = 0 ∨ b = 0)
⊢ lcm a b ∣ c ↔ a ∣ c ∧ b ∣ c

tactic: have h : gcd a b ≠ 0 := fun H => h1 ((gcd_eq_zero_iff _ _).1 H).1
state_before: case neg.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b c : α
h : ¬(a = 0 ∨ b = 0)
h1 : ¬a = 0
h2 : ¬b = 0
⊢ lcm a b ∣ c ↔ a ∣ c ∧ b ∣ c

tactic: rw [← mul_dvd_mul_iff_left h, (gcd_mul_lcm a b).dvd_iff_dvd_left, ←
  (gcd_mul_right' c a b).dvd_iff_dvd_right, dvd_gcd_iff, mul_comm b c, mul_dvd_mul_iff_left h1,
  mul_dvd_mul_iff_right h2, and_comm]
state_before: case neg.intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : GCDMonoid α
a b c : α
h✝ : ¬(a = 0 ∨ b = 0)
h1 : ¬a = 0
h2 : ¬b = 0
h : gcd a b ≠ 0
⊢ lcm a b ∣ c ↔ a ∣ c ∧ b ∣ c
Theorem: closedBall_pi'
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp [closedBall_eq_empty.2 hr]
state_before: α : Type u
β : Type v
X : Type ?u.406443
ι : Type ?u.406446
inst✝³ : PseudoMetricSpace α
π : β → Type u_1
inst✝² : Fintype β
inst✝¹ : (b : β) → PseudoMetricSpace (π b)
inst✝ : Nonempty β
x : (b : β) → π b
r : ℝ
hr : r < 0
⊢ closedBall x r = Set.pi Set.univ fun b => closedBall (x b) r
Theorem: tendsto_iff_tendsto_subseq_of_monotone
File: Mathlib/Topology/Algebra/Order/MonotoneConvergence.lean

tactic: constructor <;> intro h
state_before: α✝ : Type ?u.53718
β : Type ?u.53721
ι₁ : Type u_1
ι₂ : Type u_2
α : Type u_3
inst✝⁶ : SemilatticeSup ι₁
inst✝⁵ : Preorder ι₂
inst✝⁴ : Nonempty ι₁
inst✝³ : TopologicalSpace α
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : NoMaxOrder α
f : ι₂ → α
φ : ι₁ → ι₂
l : α
hf : Monotone f
hg : Tendsto φ atTop atTop
⊢ Tendsto f atTop (𝓝 l) ↔ Tendsto (f ∘ φ) atTop (𝓝 l)

tactic: exact h.comp hg
state_before: case mp
α✝ : Type ?u.53718
β : Type ?u.53721
ι₁ : Type u_1
ι₂ : Type u_2
α : Type u_3
inst✝⁶ : SemilatticeSup ι₁
inst✝⁵ : Preorder ι₂
inst✝⁴ : Nonempty ι₁
inst✝³ : TopologicalSpace α
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : NoMaxOrder α
f : ι₂ → α
φ : ι₁ → ι₂
l : α
hf : Monotone f
hg : Tendsto φ atTop atTop
h : Tendsto f atTop (𝓝 l)
⊢ Tendsto (f ∘ φ) atTop (𝓝 l)

tactic: rcases tendsto_of_monotone hf with (h' | ⟨l', hl'⟩)
state_before: case mpr
α✝ : Type ?u.53718
β : Type ?u.53721
ι₁ : Type u_1
ι₂ : Type u_2
α : Type u_3
inst✝⁶ : SemilatticeSup ι₁
inst✝⁵ : Preorder ι₂
inst✝⁴ : Nonempty ι₁
inst✝³ : TopologicalSpace α
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : NoMaxOrder α
f : ι₂ → α
φ : ι₁ → ι₂
l : α
hf : Monotone f
hg : Tendsto φ atTop atTop
h : Tendsto (f ∘ φ) atTop (𝓝 l)
⊢ Tendsto f atTop (𝓝 l)

tactic: exact (not_tendsto_atTop_of_tendsto_nhds h (h'.comp hg)).elim
state_before: case mpr.inl
α✝ : Type ?u.53718
β : Type ?u.53721
ι₁ : Type u_1
ι₂ : Type u_2
α : Type u_3
inst✝⁶ : SemilatticeSup ι₁
inst✝⁵ : Preorder ι₂
inst✝⁴ : Nonempty ι₁
inst✝³ : TopologicalSpace α
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : NoMaxOrder α
f : ι₂ → α
φ : ι₁ → ι₂
l : α
hf : Monotone f
hg : Tendsto φ atTop atTop
h : Tendsto (f ∘ φ) atTop (𝓝 l)
h' : Tendsto f atTop atTop
⊢ Tendsto f atTop (𝓝 l)

tactic: rwa [tendsto_nhds_unique h (hl'.comp hg)]
state_before: case mpr.inr.intro
α✝ : Type ?u.53718
β : Type ?u.53721
ι₁ : Type u_1
ι₂ : Type u_2
α : Type u_3
inst✝⁶ : SemilatticeSup ι₁
inst✝⁵ : Preorder ι₂
inst✝⁴ : Nonempty ι₁
inst✝³ : TopologicalSpace α
inst✝² : ConditionallyCompleteLinearOrder α
inst✝¹ : OrderTopology α
inst✝ : NoMaxOrder α
f : ι₂ → α
φ : ι₁ → ι₂
l : α
hf : Monotone f
hg : Tendsto φ atTop atTop
h : Tendsto (f ∘ φ) atTop (𝓝 l)
l' : α
hl' : Tendsto f atTop (𝓝 l')
⊢ Tendsto f atTop (𝓝 l)
Theorem: Nat.geom_sum_Ico_le
File: Mathlib/Algebra/GeomSum.lean

tactic: cases' n with n
state_before: α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ∑ i in Ico 1 n, a / b ^ i ≤ a / (b - 1)

tactic: rw [← add_le_add_iff_left a]
state_before: case succ
α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ∑ i in Ico 1 (succ n), a / b ^ i ≤ a / (b - 1)

tactic: calc
  (a + ∑ i : ℕ in Ico 1 n.succ, a / b ^ i) = a / b ^ 0 + ∑ i : ℕ in Ico 1 n.succ, a / b ^ i := by
    rw [pow_zero, Nat.div_one]
  _ = ∑ i in range n.succ, a / b ^ i := by
    rw [range_eq_Ico, ← Nat.Ico_insert_succ_left (Nat.succ_pos _), sum_insert]
    exact fun h => zero_lt_one.not_le (mem_Ico.1 h).1
  _ ≤ a * b / (b - 1) := Nat.geom_sum_le hb a _
  _ = (a * 1 + a * (b - 1)) / (b - 1) := by
    rw [← mul_add, add_tsub_cancel_of_le (one_le_two.trans hb)]
  _ = a + a / (b - 1) := by rw [mul_one, Nat.add_mul_div_right _ _ (tsub_pos_of_lt hb), add_comm]
state_before: case succ
α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ a + ∑ i in Ico 1 (succ n), a / b ^ i ≤ a + a / (b - 1)

tactic: rw [zero_eq, Ico_eq_empty_of_le (zero_le_one' ℕ), sum_empty]
state_before: case zero
α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a : ℕ
⊢ ∑ i in Ico 1 zero, a / b ^ i ≤ a / (b - 1)

tactic: exact Nat.zero_le _
state_before: case zero
α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a : ℕ
⊢ 0 ≤ a / (b - 1)

tactic: rw [pow_zero, Nat.div_one]
state_before: α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ a + ∑ i in Ico 1 (succ n), a / b ^ i = a / b ^ 0 + ∑ i in Ico 1 (succ n), a / b ^ i

tactic: rw [range_eq_Ico, ← Nat.Ico_insert_succ_left (Nat.succ_pos _), sum_insert]
state_before: α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ a / b ^ 0 + ∑ i in Ico 1 (succ n), a / b ^ i = ∑ i in range (succ n), a / b ^ i

tactic: exact fun h => zero_lt_one.not_le (mem_Ico.1 h).1
state_before: α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ ¬0 ∈ Ico (succ 0) (succ n)

tactic: rw [← mul_add, add_tsub_cancel_of_le (one_le_two.trans hb)]
state_before: α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ a * b / (b - 1) = (a * 1 + a * (b - 1)) / (b - 1)

tactic: rw [mul_one, Nat.add_mul_div_right _ _ (tsub_pos_of_lt hb), add_comm]
state_before: α : Type u
β : Type ?u.223090
b : ℕ
hb : 2 ≤ b
a n : ℕ
⊢ (a * 1 + a * (b - 1)) / (b - 1) = a + a / (b - 1)
Theorem: Multiset.trop_sum
File: Mathlib/Algebra/Tropical/BigOperators.lean

tactic: simpa using List.trop_sum
state_before: R : Type u_1
S : Type ?u.2531
inst✝ : AddCommMonoid R
s : Multiset R
⊢ ∀ (a : List R), trop (sum (Quotient.mk (List.isSetoid R) a)) = prod (map trop (Quotient.mk (List.isSetoid R) a))
Theorem: image_openSegment
File: Mathlib/Analysis/Convex/Segment.lean

tactic: simp_rw [openSegment_eq_image_lineMap, mem_image, exists_exists_and_eq_and,
  AffineMap.apply_lineMap]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.105044
ι : Type ?u.105047
π : ι → Type ?u.105052
inst✝⁵ : OrderedRing 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : AddCommGroup G
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
f : E →ᵃ[𝕜] F
a b : E
x : F
⊢ x ∈ ↑f '' openSegment 𝕜 a b ↔ x ∈ openSegment 𝕜 (↑f a) (↑f b)