chore: remove unnecessary annotations
This commit is contained in:
parent
dc51583233
commit
5df588cbbf
4 changed files with 4 additions and 6 deletions
|
|
@ -165,7 +165,6 @@ theorem append_cancel_right {as bs cs : List α} (h : as ++ bs = cs ++ bs) : as
|
|||
apply Nat.lt_trans ih
|
||||
simp_arith
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in -- #1214
|
||||
theorem le_antisymm [LT α] [s : Antisymm (¬ · < · : α → α → Prop)] {as bs : List α} (h₁ : as ≤ bs) (h₂ : bs ≤ as) : as = bs :=
|
||||
match as, bs with
|
||||
| [], [] => rfl
|
||||
|
|
|
|||
|
|
@ -789,7 +789,6 @@ protected theorem Nat.lt_irrefl (n : Nat) : Not (LT.lt n n) :=
|
|||
protected theorem Nat.lt_of_le_of_lt {n m k : Nat} (h₁ : LE.le n m) (h₂ : LT.lt m k) : LT.lt n k :=
|
||||
Nat.le_trans (Nat.succ_le_succ h₁) h₂
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in -- #1214
|
||||
protected theorem Nat.le_antisymm {n m : Nat} (h₁ : LE.le n m) (h₂ : LE.le m n) : Eq n m :=
|
||||
match h₁ with
|
||||
| Nat.le.refl => rfl
|
||||
|
|
@ -800,7 +799,6 @@ protected theorem Nat.lt_of_le_of_ne {n m : Nat} (h₁ : LE.le n m) (h₂ : Not
|
|||
| Or.inl h₃ => h₃
|
||||
| Or.inr h₃ => absurd (Nat.le_antisymm h₁ h₃) h₂
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in -- #1214
|
||||
theorem Nat.le_of_ble_eq_true (h : Eq (Nat.ble n m) true) : LE.le n m :=
|
||||
match n, m with
|
||||
| 0, _ => Nat.zero_le _
|
||||
|
|
|
|||
|
|
@ -8,16 +8,17 @@ import Init.Data.String.Basic
|
|||
import Init.Data.ToString.Basic
|
||||
|
||||
universe u v
|
||||
set_option linter.unusedVariables.funArgs false
|
||||
|
||||
/-! # Debugging helper functions -/
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in
|
||||
@[neverExtract, extern "lean_dbg_trace"]
|
||||
def dbgTrace {α : Type u} (s : String) (f : Unit → α) : α := f ()
|
||||
|
||||
def dbgTraceVal {α : Type u} [ToString α] (a : α) : α :=
|
||||
dbgTrace (toString a) (fun _ => a)
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in
|
||||
/-- Display the given message if `a` is shared, that is, RC(a) > 1 -/
|
||||
@[neverExtract, extern "lean_dbg_trace_if_shared"]
|
||||
def dbgTraceIfShared {α : Type u} (s : String) (a : α) : α := a
|
||||
|
|
@ -40,6 +41,7 @@ def dbgSleep {α : Type u} (ms : UInt32) (f : Unit → α) : α := f ()
|
|||
@[extern "lean_ptr_addr"]
|
||||
unsafe def ptrAddrUnsafe {α : Type u} (a : @& α) : USize := 0
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in
|
||||
@[inline] unsafe def withPtrAddrUnsafe {α : Type u} {β : Type v} (a : α) (k : USize → β) (h : ∀ u₁ u₂, k u₁ = k u₂) : β :=
|
||||
k (ptrAddrUnsafe a)
|
||||
|
||||
|
|
@ -50,6 +52,7 @@ unsafe def ptrEqList : (as bs : List α) → Bool
|
|||
| a::as, b::bs => if ptrEq a b then ptrEqList as bs else false
|
||||
| _, _ => false
|
||||
|
||||
set_option linter.unusedVariables.funArgs false in
|
||||
@[inline] unsafe def withPtrEqUnsafe {α : Type u} (a b : α) (k : Unit → Bool) (h : a = b → k () = true) : Bool :=
|
||||
if ptrEq a b then true else k ()
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ def findEntry? [BEq α] [Hashable α] (m : HashMapImp α β) (a : α) : Option (
|
|||
let ⟨i, h⟩ := mkIdx buckets.property (hash a |>.toUSize)
|
||||
buckets.val[i].findEntry? a
|
||||
|
||||
set_option linter.unusedVariables false in -- #1214
|
||||
def find? [beq : BEq α] [Hashable α] (m : HashMapImp α β) (a : α) : Option β :=
|
||||
match m with
|
||||
| ⟨_, buckets⟩ =>
|
||||
|
|
@ -95,7 +94,6 @@ def expand [Hashable α] (size : Nat) (buckets : HashMapBucket α β) : HashMapI
|
|||
{ size := size,
|
||||
buckets := moveEntries 0 buckets.val new_buckets }
|
||||
|
||||
set_option linter.unusedVariables false in -- #1214
|
||||
@[inline] def insert [beq : BEq α] [Hashable α] (m : HashMapImp α β) (a : α) (b : β) : HashMapImp α β × Bool :=
|
||||
match m with
|
||||
| ⟨size, buckets⟩ =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue