Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Init/Data/Int/LemmasAux.lean
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ theorem natCast_succ_pos (n : Nat) : 0 < (n.succ : Int) := natCast_pos.2 n.succ_

@[simp high] theorem natCast_nonpos_iff {n : Nat} : (n : Int) ≤ 0 ↔ n = 0 := by omega

@[simp, norm_cast] theorem cast_id {n : Int} : Int.cast n = n := rfl
@[simp, norm_cast, grind =] theorem cast_id {n : Int} : Int.cast n = n := rfl

@[simp] theorem ble'_eq_true (a b : Int) : (Int.ble' a b = true) = (a ≤ b) := by
cases a <;> cases b <;> simp [Int.ble'] <;> omega
Expand Down
5 changes: 5 additions & 0 deletions src/Init/Data/Nat/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public import Init.Data.Nat.Log2
import all Init.Data.Nat.Log2
public import Init.Data.Nat.Power2
public import Init.Data.Nat.Mod
public import Init.Data.Cast
import Init.TacticsExtra
import Init.BinderPredicates

Expand Down Expand Up @@ -1800,3 +1801,7 @@ instance decidableExistsFin (P : Fin n → Prop) [DecidablePred P] : Decidable (
decidable_of_iff (∃ k, k < n ∧ ((h: k < n) → P ⟨k, h⟩))
⟨fun ⟨k, a⟩ => Exists.intro ⟨k, a.left⟩ (a.right a.left),
fun ⟨i, e⟩ => Exists.intro i.val ⟨i.isLt, fun _ => e⟩⟩

/-! ### cast -/

@[simp, norm_cast, grind =] theorem cast_id (n : Nat) : Nat.cast n = n := rfl
Loading