File: .lake/packages/lean4/src/lean/Init/Data/Array/Mem.lean

full_name: Array.Mem.val
code: /-- `a ∈ as` is a predicate which asserts that `a` is in the array `as`. -/
-- NB: This is defined as a structure rather than a plain def so that a lemma
-- like `sizeOf_lt_of_mem` will not apply with no actual arrays around.
structure Mem (a : α) (as : Array α) : Prop where
  val : a ∈ as.data
goal: a ∈ as.data

full_name: Array.Mem
code: /-- `a ∈ as` is a predicate which asserts that `a` is in the array `as`. -/
-- NB: This is defined as a structure rather than a plain def so that a lemma
-- like `sizeOf_lt_of_mem` will not apply with no actual arrays around.
structure Mem (a : α) (as : Array α) : Prop where
  val : a ∈ as.data
goal: Prop

full_name: Array.«instMembership_.lake»
code: instance : Membership α (Array α) 
goal: Membership α (Array α)

full_name: Array.sizeOf_lt_of_mem
code: theorem sizeOf_lt_of_mem [SizeOf α] {as : Array α} (h : a ∈ as) : sizeOf a < sizeOf as 
goal: sizeOf a < sizeOf as

full_name: Array.sizeOf_get
code: @[simp] theorem sizeOf_get [SizeOf α] (as : Array α) (i : Fin as.size) : sizeOf (as.get i) < sizeOf as 
goal: sizeOf (as.get i) < sizeOf as

full_name: Array.sizeOf_getElem
code: @[simp] theorem sizeOf_getElem [SizeOf α] (as : Array α) (i : Nat) (h : i < as.size) :
  sizeOf (as[i]'h) < sizeOf as 
goal: sizeOf as[i] < sizeOf as

full_name: Array.tacticArray_get_dec
code: macro "array_get_dec" : tactic =>
  `(tactic| first
    -- subsumed by simp
    -- | with_reducible apply sizeOf_get
    -- | with_reducible apply sizeOf_getElem
    | (with_reducible apply Nat.lt_trans (sizeOf_get ..)); simp_arith
    | (with_reducible apply Nat.lt_trans (sizeOf_getElem ..)); simp_arith
    )
goal: Lean.ParserDescr

full_name: Array.«_aux_.lake_packages_lean4_src_lean_Init_Data_Array_Mem___macroRules_Array_tacticArray_get_dec_1»
code: macro "array_get_dec" : tactic =>
  `(tactic| first
    -- subsumed by simp
    -- | with_reducible apply sizeOf_get
    -- | with_reducible apply sizeOf_getElem
    | (with_reducible apply Nat.lt_trans (sizeOf_get ..)); simp_arith
    | (with_reducible apply Nat.lt_trans (sizeOf_getElem ..)); simp_arith
    )
goal: Lean.Macro

full_name: Array.«_aux_.lake_packages_lean4_src_lean_Init_Data_Array_Mem___macroRules_tacticDecreasing_trivial_1»
code: macro_rules | `(tactic| decreasing_trivial) => `(tactic| array_get_dec)
goal: Lean.Macro

full_name: Array.tacticArray_mem_dec
code: macro "array_mem_dec" : tactic =>
  `(tactic| first
    | with_reducible apply Array.sizeOf_lt_of_mem; assumption; done
    | with_reducible
        apply Nat.lt_trans (Array.sizeOf_lt_of_mem ?h)
        case' h => assumption
      simp_arith)
goal: Lean.ParserDescr

full_name: Array.«_aux_.lake_packages_lean4_src_lean_Init_Data_Array_Mem___macroRules_Array_tacticArray_mem_dec_1»
code: macro "array_mem_dec" : tactic =>
  `(tactic| first
    | with_reducible apply Array.sizeOf_lt_of_mem; assumption; done
    | with_reducible
        apply Nat.lt_trans (Array.sizeOf_lt_of_mem ?h)
        case' h => assumption
      simp_arith)
goal: Lean.Macro

full_name: Array.«_aux_.lake_packages_lean4_src_lean_Init_Data_Array_Mem___macroRules_tacticDecreasing_trivial_2»
code: macro_rules | `(tactic| decreasing_trivial) => `(tactic| array_mem_dec)
goal: Lean.Macro