chore(builtin): rename nat, int and real modules to Nat, Int and Real.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-01-01 13:52:25 -08:00
parent 43909ca66b
commit 7726ccad28
166 changed files with 175 additions and 176 deletions

View file

@ -1,5 +1,5 @@
Import Int
Import tactic
Import int
Definition a : Nat := 10
(* Trivial indicates a "proof by evaluation" *)
Theorem T1 : a > 0 := Trivial

View file

@ -67,10 +67,9 @@ function(add_theory FILE DEPS)
endfunction()
add_kernel_theory("kernel.lean" "${CMAKE_CURRENT_BINARY_DIR}/macros.lua")
add_kernel_theory("nat.lean" "${CMAKE_CURRENT_BINARY_DIR}/kernel.olean")
add_theory("int.lean" "${CMAKE_CURRENT_BINARY_DIR}/nat.olean")
add_theory("real.lean" "${CMAKE_CURRENT_BINARY_DIR}/int.olean")
add_theory("specialfn.lean" "${CMAKE_CURRENT_BINARY_DIR}/real.olean")
add_theory("cast.lean" "${CMAKE_CURRENT_BINARY_DIR}/nat.olean")
add_kernel_theory("Nat.lean" "${CMAKE_CURRENT_BINARY_DIR}/kernel.olean")
add_theory("Int.lean" "${CMAKE_CURRENT_BINARY_DIR}/Nat.olean")
add_theory("Real.lean" "${CMAKE_CURRENT_BINARY_DIR}/Int.olean")
add_theory("specialfn.lean" "${CMAKE_CURRENT_BINARY_DIR}/Real.olean")
add_theory("cast.lean" "${CMAKE_CURRENT_BINARY_DIR}/Nat.olean")

View file

@ -1,4 +1,4 @@
Import nat.
Import Nat.
Variable Int : Type.
Alias : Int.

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable Real : Type.
Alias : Real.

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,4 @@
Import real.
Import Real.
Variable exp : Real → Real.
Variable log : Real → Real.

View file

@ -158,7 +158,7 @@ MK_CONSTANT(nat_neg_fn, name({"Nat", "neg"}));
void import_int(environment const & env) {
io_state ios;
env->import("int", ios);
env->import("Int", ios);
}
static int mk_int_value(lua_State * L) {

View file

@ -117,7 +117,7 @@ MK_CONSTANT(nat_id_fn, name({"Nat", "id"}));
void import_nat(environment const & env) {
io_state ios;
env->import("nat", ios);
env->import("Nat", ios);
}
static int mk_nat_value(lua_State * L) {

View file

@ -159,7 +159,7 @@ MK_CONSTANT(nat_to_real_fn, name("nat_to_real"));
void import_real(environment const & env) {
io_state ios;
env->import("real", ios);
env->import("Real", ios);
}
static int mk_real_value(lua_State * L) {

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Axiom PlusComm(a b : Int) : a + b == b + a.
Variable a : Int.
Check (Abst (fun x : Int, (PlusComm a x))).

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: PlusComm
Assumed: a
Abst (λ x : , PlusComm a x) : (λ x : , a + x) == (λ x : , x + a)

View file

@ -1,5 +1,5 @@
Import tactic.
Import int.
Import Int.
Variable f : Int -> Int -> Bool
Variable P : Int -> Int -> Bool

View file

@ -1,7 +1,7 @@
Set: pp::colors
Set: pp::unicode
Imported 'tactic'
Imported 'int'
Imported 'Int'
Assumed: f
Assumed: P
Assumed: Ax1

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Check 10 + 20
Check 10
Check 10 - 20

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
10 + 20 :
10 :
10 - 20 :

View file

@ -1,5 +1,5 @@
Import int.
Import real.
Import Int.
Import Real.
Show 1/2
Eval 4/6
Show 3 div 2

View file

@ -1,7 +1,7 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'real'
Imported 'Int'
Imported 'Real'
1 / 2
2/3
3 div 2

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Eval 8 mod 3
Eval 8 div 4
Eval 7 div 3

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
2
2
2

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
SetOption pp::unicode false
Show 3 | 6
Eval 3 | 6

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Set: pp::unicode
3 | 6
true

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Eval | -2 |
(*
Unfortunately, we can't write |-2|, because |- is considered a single token.

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
2
3
Defined: x

View file

@ -1,4 +1,4 @@
Import real.
Import Real.
Eval 10.3
Eval 0.3
Eval 0.3 + 0.1

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'real'
Imported 'Real'
103/10
3/10
2/5

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Show (Int -> Int) -> Int
Show Int -> Int -> Int
Show Int -> (Int -> Int)

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
() →

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable g : Pi A : Type, A -> A.
Variables a b : Int
Axiom H1 : g _ a > 0

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: g
Assumed: a
Assumed: b

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable list : Type -> Type
Variable nil {A : Type} : list A
Variable cons {A : Type} (head : A) (tail : list A) : list A

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: list
Assumed: nil
Assumed: cons

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable list : Type -> Type
Variable nil {A : Type} : list A
Variable cons {A : Type} (head : A) (tail : list A) : list A

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: list
Assumed: nil
Assumed: cons

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable f {A : Type} (a : A) : A
Variable a : Int
Definition tst : Bool := (fun x, (f x) > 10) a

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: f
Assumed: a
Defined: tst

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable g {A : Type} (a : A) : A
Variable a : Int
Variable b : Int

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: g
Assumed: a
Assumed: b

View file

@ -1,5 +1,5 @@
Import int.
Import real.
Import Int.
Import Real.
Variable f {A : Type} (a : A) : A
Variable a : Int
Variable b : Real

View file

@ -1,7 +1,7 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'real'
Imported 'Int'
Imported 'Real'
Assumed: f
Assumed: a
Assumed: b

View file

@ -1,4 +1,4 @@
Import real.
Import Real.
Variable f {A : Type} (a b : A) : Bool
Variable a : Int
Variable b : Real

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'real'
Imported 'Real'
Assumed: f
Assumed: a
Assumed: b

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable list : Type → Type
Variable nil {A : Type} : list A
Variable cons {A : Type} (head : A) (tail : list A) : list A

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: list
Assumed: nil
Assumed: cons

View file

@ -1,5 +1,5 @@
Import cast.
Import int.
Import Int.
Variable vector : Type -> Nat -> Type
Axiom N0 (n : Nat) : n + 0 = n

View file

@ -1,7 +1,7 @@
Set: pp::colors
Set: pp::unicode
Imported 'cast'
Imported 'int'
Imported 'Int'
Assumed: vector
Assumed: N0
Proved: V0

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Definition id (A : Type) : (Type U) := A.
Variable p : (Int -> Int) -> Bool.
Check fun (x : id Int), x.

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Defined: id
Assumed: p
λ x : id , x : id → id

View file

@ -6,7 +6,7 @@
Proved: R2
Set: lean::pp::implicit
Import "kernel"
Import "nat"
Import "Nat"
Variable C {A B : Type} (H : @eq Type A B) (a : A) : B
Variable D {A A' : Type} {B : A → Type} {B' : A' → Type} (H : @eq Type (Π x : A, B x) (Π x : A', B' x)) :
@eq Type A A'

View file

@ -6,7 +6,7 @@
Proved: R2
Set: lean::pp::implicit
Import "kernel"
Import "nat"
Import "Nat"
Variable C {A B : Type} (H : @eq Type A B) (a : A) : B
Variable D {A A' : Type} {B : A → Type} {B' : A' → Type} (H : @eq Type (Π x : A, B x) (Π x : A', B' x)) :
@eq Type A A'

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable i : Int
Check i = 0
SetOption pp::coercion true

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: i
i = 0 : Bool
Set: lean::pp::coercion

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable List : Type -> Type
Variable nil {A : Type} : List A
Variable cons {A : Type} (head : A) (tail : List A) : List A

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: List
Assumed: nil
Assumed: cons

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable a : Int
Variable P : Int -> Int -> Bool
Axiom H : P a a

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: a
Assumed: P
Assumed: H

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable a : Int
Variable P : Int -> Int -> Bool
Variable f : Int -> Int -> Int

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: a
Assumed: P
Assumed: f

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable P : Int -> Int -> Bool
SetOpaque exists false.

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: P
Proved: T1
Assumed: Ax

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable P : Int -> Int -> Int -> Bool
Axiom Ax1 : exists x y z, P x y z
Axiom Ax2 : forall x y z, not (P x y z)

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: P
Assumed: Ax1
Assumed: Ax2

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable P : Int -> Int -> Bool
Theorem T1 (R1 : not (exists x y, P x y)) : forall x y, not (P x y) :=

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: P
Proved: T1
Assumed: Ax

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable f {A : Type} : A -> A -> A
Variable module::g {A : Type} : A -> A -> A
Check @f

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: f
Assumed: module::g
@f : Π (A : Type), A → A → A

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable P : Int -> Bool
Axiom Ax (x : Int) : P x
Check ForallIntro Ax

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: P
Assumed: Ax
ForallIntro Ax : ∀ x : , P x

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable g {A : Type} (a : A) : A
Variable a : Int
Variable b : Int

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: g
Assumed: a
Assumed: b

View file

@ -1,5 +1,5 @@
Import int.
Import real.
Import Int.
Import Real.
Variable f : Int -> Int -> Int
Show forall a, f a a > 0
Show forall a b, f a b > 0

View file

@ -1,7 +1,7 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'real'
Imported 'Int'
Imported 'Real'
Assumed: f
∀ a : , f a a > 0
∀ a b : , f a b > 0

View file

@ -1,4 +1,4 @@
Import real.
Import Real.
Variable f {A : Type} (x y : A) : A
Check f 10 20
Check f 10

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'real'
Imported 'Real'
Assumed: f
f 10 20 :
f 10 :

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Show 10 = 20
Variable f : Int -> Int -> Int

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
10 = 20
Assumed: f
Assumed: g

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable f {A : Type} (a1 a2 : A) {B : Type} (b1 b2 : B) : A
Variable g {A1 A2 : Type} (a1 : A1) (a2 : A2) {B : Type} (b : B) : A1
Variable p (a1 a2 : Int) {B : Type} (b1 b2 b3 : B) : B

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: f
Assumed: g
Assumed: p

View file

@ -1,5 +1,5 @@
Import int.
Import real.
Import Int.
Import Real.
Variable f {A : Type} (a1 a2 : A) : A
Variable g : Int -> Int -> Int
Variable h : Int -> Int -> Real -> Int

View file

@ -1,7 +1,7 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'real'
Imported 'Int'
Imported 'Real'
Assumed: f
Assumed: g
Assumed: h

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable f {A : Type} : A -> A -> A
Infixl 65 + : f
Show true + false

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: f
+ ⊥
10 + 20

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
(** import("tactic.lua") **)
Variable q : Int -> Int -> Bool.
Variable p : Int -> Bool.

View file

@ -1,6 +1,6 @@
# Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
# Assumed: q
# Assumed: p
# Assumed: Ax

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Show let a : Nat := 10, b : Nat := 20, c : Nat := 30, d : Nat := 10 in a + b + c + d
Show let a : Nat := 1000000000000000000, b : Nat := 20000000000000000000, c : Nat := 3000000000000000000, d : Nat := 4000000000000000000 in a + b + c + d

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
let a : := 10, b : := 20, c : := 30, d : := 10 in a + b + c + d
let a : := 1000000000000000000,
b : := 20000000000000000000,

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable magic : Pi (H : Bool), H

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: magic
Set: lean::pp::notation
Set: lean::pp::coercion

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Show
let b := true,

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
let b := , a : := b in a
Assumed: vector
Assumed: const

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
(**
function add_paren(code)

View file

@ -1,5 +1,5 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Variable x :
done

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
Variable x : Int
(**

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Assumed: x
hello world from Lua
Assumed: y

View file

@ -1,4 +1,4 @@
Import int.
Import Int.
(**
local env = get_environment()

View file

@ -1,6 +1,6 @@
Set: pp::colors
Set: pp::unicode
Imported 'int'
Imported 'Int'
Int::add
BuiltinSet Nat::numeral
512

Some files were not shown because too many files have changed in this diff Show more