lean4-htt/library/init/default.lean
Jared Roesch e65d90ac79 feat(*): C++ code generator
in progress move of Lean.native to init
2016-12-05 16:11:41 -08:00

33 lines
1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/-
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import init.core init.logic init.category init.data.basic
import init.propext init.funext init.category.combinators init.function init.classical
import init.util init.coe init.wf init.meta init.algebra init.data
import init.native
def debugger.attr : user_attribute :=
{ name := `breakpoint,
descr := "breakpoint for debugger" }
run_command attribute.register `debugger.attr
open tactic
/-
Define id_locked using meta-programming because we don't have
syntax for setting reducibility_hints.
See module init.meta.declaration.
-/
run_command do
l ← return $ level.param `l,
Ty ← return $ expr.sort l,
type ← to_expr `(Π {α : %%Ty}, αα),
val ← to_expr `(λ {α : %%Ty} (a : α), a),
add_decl (declaration.defn `id_locked [`l] type val reducibility_hints.opaque tt)
lemma {u} id_locked_eq {α : Type u} (a : α) : id_locked a = a :=
rfl