fix(tests/lean): adjust tests to modifications to standard library
This commit is contained in:
parent
697d4359e3
commit
eefe03cf56
101 changed files with 158 additions and 76 deletions
|
@ -1,6 +1,6 @@
|
|||
import logic.prop
|
||||
|
||||
namespace play
|
||||
inductive acc (A : Type) (R : A → A → Prop) : A → Prop :=
|
||||
intro : ∀ (x : A), (∀ (y : A), R y x → acc A R y) → acc A R x
|
||||
|
||||
check @acc.rec
|
||||
end play
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import logic.prop
|
||||
|
||||
namespace play
|
||||
inductive acc {A : Type} (R : A → A → Prop) : A → Prop :=
|
||||
intro : ∀x, (∀ y, R y x → acc R y) → acc R x
|
||||
|
||||
|
@ -20,3 +19,4 @@ check F x₁
|
|||
(λ (y : A) (a : R y x₁),
|
||||
acc.rec (λ (x₂ : A) (ac : ∀ (y : A), R y x₂ → acc R y) (iH : Π (y : A), R y x₂ → C y), F x₂ iH)
|
||||
(ac y a))
|
||||
end play
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
structure prod.{l} (A : Type.{l}) (B : Type.{l}) :=
|
||||
prelude namespace foo structure prod.{l} (A : Type.{l}) (B : Type.{l}) :=
|
||||
(pr1 : A) (pr2 : B)
|
||||
|
||||
structure prod.{l} (A : Type.{l}) (B : Type.{l}) : Type :=
|
||||
|
@ -9,3 +9,4 @@ structure prod.{l} (A : Type.{l}) (B : Type.{l}) : Type.{l} :=
|
|||
|
||||
structure prod.{l} (A : Type.{l}) (B : Type.{l}) : Type.{max 1 l} :=
|
||||
(pr1 : A) (pr2 : B)
|
||||
end foo
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
bad_structures.lean:1:49: error: invalid 'structure', the resultant universe must be provided when explicit universe levels are being used
|
||||
bad_structures.lean:1:71: error: invalid 'structure', the resultant universe must be provided when explicit universe levels are being used
|
||||
bad_structures.lean:4:49: error: invalid 'structure', the resultant universe must be provided when explicit universe levels are being used
|
||||
bad_structures.lean:7:49: error: invalid 'structure', the resultant universe level should not be zero for any universe parameter assignment
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic
|
||||
import logic
|
||||
open tactic
|
||||
|
||||
theorem foo (A : Type) (a b c : A) (Hab : a = b) (Hbc : b = c) : a = c :=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
definition bool : Type.{1} := Type.{0}
|
||||
prelude definition bool : Type.{1} := Type.{0}
|
||||
definition and (p q : bool) : bool := ∀ c : bool, (p → q → c) → c
|
||||
infixl `∧`:25 := and
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
constant A : Type.{1}
|
||||
prelude constant A : Type.{1}
|
||||
definition bool : Type.{1} := Type.{0}
|
||||
constant eq : A → A → bool
|
||||
infixl `=`:50 := eq
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
-- set_option default configuration for tests
|
||||
prelude
|
||||
set_option pp.colors false
|
||||
set_option pp.unicode true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import logic tools.tactic
|
||||
import logic
|
||||
open tactic
|
||||
|
||||
definition simple := apply trivial
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic.eq
|
||||
prelude import logic.eq
|
||||
open tactic
|
||||
set_option pp.notation false
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import logic data.prod priority
|
||||
import logic data.prod
|
||||
set_option pp.notation false
|
||||
|
||||
inductive C [class] (A : Type) :=
|
||||
|
|
|
@ -4,11 +4,16 @@
|
|||
false|Prop
|
||||
false.rec|Π (C : Type), false → C
|
||||
false_elim|false → ?c
|
||||
false.of_ne|?a ≠ ?a → false
|
||||
false.rec_on|Π (C : Type), false → C
|
||||
false.cases_on|Π (C : Type), false → C
|
||||
false.decidable|decidable false
|
||||
false.induction_on|∀ (C : Prop), false → C
|
||||
not_false_trivial|¬ false
|
||||
true_ne_false|¬ true = false
|
||||
eq.false_elim|?p = false → ¬ ?p
|
||||
p_ne_false|?p → ?p ≠ false
|
||||
eq_false_elim|?a = false → ¬ ?a
|
||||
decidable.rec_on_false|Π (H3 : ¬ ?p), ?H2 H3 → decidable.rec_on ?H ?H1 ?H2
|
||||
not_false|¬ false
|
||||
if_false|∀ (t e : ?A), (if false then t else e) = e
|
||||
iff.false_elim|?a ↔ false → ¬ ?a
|
||||
-- ENDFINDP
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
-- BEGINEVAL
|
||||
Type : Type
|
||||
Type₁ : Type₂
|
||||
-- ENDEVAL
|
||||
-- BEGINSET
|
||||
-- ENDSET
|
||||
-- BEGINEVAL
|
||||
Type.{1} : Type.{2}
|
||||
Type₁ : Type₂
|
||||
-- ENDEVAL
|
||||
-- BEGINWAIT
|
||||
-- ENDWAIT
|
||||
|
|
|
@ -3,16 +3,26 @@
|
|||
-- BEGINSET
|
||||
-- ENDSET
|
||||
-- BEGINFINDP
|
||||
pos_num.size|pos_num → pos_num
|
||||
pos_num.bit0|pos_num → pos_num
|
||||
pos_num.is_inhabited|inhabited pos_num
|
||||
pos_num.is_one|pos_num → bool
|
||||
pos_num.inc|pos_num → pos_num
|
||||
pos_num.ibelow|pos_num → Prop
|
||||
pos_num.induction_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.succ|pos_num → pos_num
|
||||
pos_num.bit1|pos_num → pos_num
|
||||
pos_num.rec|?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → (Π (n : pos_num), ?C n)
|
||||
pos_num.one|pos_num
|
||||
pos_num.below|pos_num → Type
|
||||
pos_num.cases_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.pred|pos_num → pos_num
|
||||
pos_num.mul|pos_num → pos_num → pos_num
|
||||
pos_num.no_confusion_type|Type → pos_num → pos_num → Type
|
||||
pos_num.num_bits|pos_num → pos_num
|
||||
pos_num.no_confusion|eq ?v1 ?v2 → pos_num.no_confusion_type ?P ?v1 ?v2
|
||||
pos_num.rec_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.add|pos_num → pos_num → pos_num
|
||||
pos_num|Type
|
||||
-- ENDFINDP
|
||||
-- BEGINWAIT
|
||||
|
@ -23,25 +33,43 @@ pos_num|Type
|
|||
pos_num.size|pos_num → pos_num
|
||||
pos_num.bit0|pos_num → pos_num
|
||||
pos_num.is_inhabited|inhabited pos_num
|
||||
pos_num.is_one|pos_num → bool
|
||||
pos_num.inc|pos_num → pos_num
|
||||
pos_num.ibelow|pos_num → Prop
|
||||
pos_num.induction_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.succ|pos_num → pos_num
|
||||
pos_num.bit1|pos_num → pos_num
|
||||
pos_num.rec|?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → (Π (n : pos_num), ?C n)
|
||||
pos_num.one|pos_num
|
||||
pos_num.below|pos_num → Type
|
||||
pos_num.cases_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.pred|pos_num → pos_num
|
||||
pos_num.mul|pos_num → pos_num → pos_num
|
||||
pos_num.no_confusion_type|Type → pos_num → pos_num → Type
|
||||
pos_num.no_confusion|eq ?v1 ?v2 → pos_num.no_confusion_type ?P ?v1 ?v2
|
||||
pos_num.rec_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.add|pos_num → pos_num → pos_num
|
||||
pos_num|Type
|
||||
-- ENDFINDP
|
||||
-- BEGINFINDP
|
||||
pos_num.size|pos_num → pos_num
|
||||
pos_num.bit0|pos_num → pos_num
|
||||
pos_num.is_inhabited|inhabited pos_num
|
||||
pos_num.is_one|pos_num → bool
|
||||
pos_num.inc|pos_num → pos_num
|
||||
pos_num.ibelow|pos_num → Prop
|
||||
pos_num.induction_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.succ|pos_num → pos_num
|
||||
pos_num.bit1|pos_num → pos_num
|
||||
pos_num.rec|?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → (Π (n : pos_num), ?C n)
|
||||
pos_num.one|pos_num
|
||||
pos_num.below|pos_num → Type
|
||||
pos_num.cases_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.pred|pos_num → pos_num
|
||||
pos_num.mul|pos_num → pos_num → pos_num
|
||||
pos_num.no_confusion_type|Type → pos_num → pos_num → Type
|
||||
pos_num.no_confusion|eq ?v1 ?v2 → pos_num.no_confusion_type ?P ?v1 ?v2
|
||||
pos_num.rec_on|Π (n : pos_num), ?C pos_num.one → (Π (a : pos_num), ?C a → ?C (pos_num.bit1 a)) → (Π (a : pos_num), ?C a → ?C (pos_num.bit0 a)) → ?C n
|
||||
pos_num.add|pos_num → pos_num → pos_num
|
||||
pos_num|Type
|
||||
-- ENDFINDP
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- Correct version
|
||||
prelude -- Correct version
|
||||
check let bool := Type.{0},
|
||||
and (p q : bool) := ∀ c : bool, (p → q → c) → c,
|
||||
infixl `∧`:25 := and,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
set_option pp.notation false
|
||||
prelude set_option pp.notation false
|
||||
definition Prop := Type.{0}
|
||||
constant eq {A : Type} : A → A → Prop
|
||||
infixl `=`:50 := eq
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
section
|
||||
prelude section
|
||||
variable A : Type
|
||||
variable a : A
|
||||
variable c : A
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
check λ {A : Type.{1}} (B : Type.{1}) (a : A) (b : B), a
|
||||
prelude check λ {A : Type.{1}} (B : Type.{1}) (a : A) (b : B), a
|
||||
check λ {A : Type.{1}} {B : Type.{1}} (a : A) (b : B), a
|
||||
check λ (A : Type.{1}) {B : Type.{1}} (a : A) (b : B), a
|
||||
check λ (A : Type.{1}) (B : Type.{1}) (a : A) (b : B), a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type
|
||||
--
|
||||
|
||||
inductive prod (A B : Type₊) :=
|
||||
mk : A → B → prod A B
|
||||
inductive prod2 (A B : Type₊) :=
|
||||
mk : A → B → prod2 A B
|
||||
|
||||
set_option pp.universes true
|
||||
check @prod
|
||||
check @prod2
|
||||
|
|
|
@ -1 +1 @@
|
|||
prod.{l_1 l_2} : Type.{l_1+1} → Type.{l_2+1} → Type.{max (l_1+1) (l_2+1)}
|
||||
prod2.{l_1 l_2} : Type.{l_1+1} → Type.{l_2+1} → Type.{max (l_1+1) (l_2+1)}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
constant A.{l1 l2} : Type.{l1} → Type.{l2}
|
||||
check A
|
||||
definition tst.{l} (A : Type) (B : Type) (C : Type.{l}) : Type := A → B → C
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic.eq
|
||||
import logic.eq
|
||||
open tactic
|
||||
|
||||
theorem foo (A : Type) (a b c : A) (Hab : a = b) (Hbc : b = c) : a = c :=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import hott.path tools.tactic
|
||||
import hott.path
|
||||
|
||||
open path tactic
|
||||
open path (rec_on)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic
|
||||
import logic
|
||||
open tactic
|
||||
|
||||
theorem foo (A : Type) (a b c : A) : a = b → b = c → a = c ∧ c = a :=
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
import logic
|
||||
namespace experiment
|
||||
inductive nat : Type :=
|
||||
|
@ -22,10 +23,10 @@ definition is_zero (x : nat)
|
|||
:= nat.rec true (λ n r, false) x
|
||||
|
||||
theorem is_zero_zero : is_zero zero
|
||||
:= eq_true_elim (refl _)
|
||||
:= eq.true_elim (refl _)
|
||||
|
||||
theorem not_is_zero_succ (x : nat) : ¬ is_zero (succ x)
|
||||
:= eq_false_elim (refl _)
|
||||
:= eq.false_elim (refl _)
|
||||
|
||||
theorem dichotomy (m : nat) : m = zero ∨ (∃ n, m = succ n)
|
||||
:= nat.rec
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import data.num
|
||||
|
||||
|
||||
namespace play
|
||||
constants int nat real : Type.{1}
|
||||
constant nat_add : nat → nat → nat
|
||||
constant int_add : int → int → int
|
||||
|
@ -53,3 +53,4 @@ definition id (A : Type) (a : A) := a
|
|||
notation A `=` B `:` C := @eq C A B
|
||||
check nat_to_int n + nat_to_int m = (n + m) : int
|
||||
end foo
|
||||
end play
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
prelude
|
||||
|
||||
constant A : Type.{1}
|
||||
constant B : Type.{1}
|
||||
constant f : A → B
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import data.unit
|
||||
open unit
|
||||
|
||||
namespace play
|
||||
constant int : Type.{1}
|
||||
constant nat : Type.{1}
|
||||
constant izero : int
|
||||
|
@ -13,3 +13,4 @@ definition g [coercion] (a : unit) : nat := nzero
|
|||
set_option pp.coercions true
|
||||
check isucc star
|
||||
check nsucc star
|
||||
end play
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
--- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
--- Author: Jeremy Avigad
|
||||
----------------------------------------------------------------------------------------------------
|
||||
import logic.connectives algebra.function
|
||||
import algebra.function
|
||||
open function
|
||||
|
||||
namespace congr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import data.nat logic.inhabited
|
||||
import data.nat
|
||||
open nat inhabited
|
||||
|
||||
constant N : Type.{1}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import data.nat data.prod logic.wf_k
|
||||
import data.nat data.prod
|
||||
open nat well_founded decidable prod eq.ops
|
||||
|
||||
-- Auxiliary lemma used to justify recursive call
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constant eq : forall {A : Type}, A → A → Prop
|
||||
constant N : Type.{1}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
prelude
|
||||
definition Prop := Type.{0}
|
||||
check Prop
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop := Type.{0}
|
||||
|
||||
definition false := ∀x : Prop, x
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop := Type.{0}
|
||||
|
||||
definition false : Prop := ∀x : Prop, x
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop := Type.{0}
|
||||
|
||||
definition false : Prop := ∀x : Prop, x
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+`:65
|
||||
|
||||
namespace nat
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import general_notation type
|
||||
|
||||
inductive fibrant [class] (T : Type) : Type :=
|
||||
fibrant_mk : fibrant T
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import general_notation
|
||||
|
||||
inductive fibrant [class] (T : Type) : Type :=
|
||||
fibrant_mk : fibrant T
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import data.nat.basic data.sum data.sigma logic.wf data.bool
|
||||
import data.nat.basic data.sum data.sigma data.bool
|
||||
open nat sigma
|
||||
|
||||
inductive tree (A : Type) : Type :=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import data.nat data.prod logic.wf_k
|
||||
import data.nat data.prod
|
||||
open nat well_founded decidable prod eq.ops
|
||||
|
||||
namespace playground
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import hott.path tools.tactic
|
||||
import hott.path
|
||||
open path
|
||||
|
||||
definition concat_pV_p {A : Type} {x y z : A} (p : x ≈ z) (q : y ≈ z) : (p ⬝ q⁻¹) ⬝ q ≈ p :=
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
-- Various structures with 1, *, inv, including groups.
|
||||
|
||||
import logic.eq logic.connectives
|
||||
import logic.eq
|
||||
import data.unit data.sigma data.prod
|
||||
import algebra.function algebra.binary
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
-- Various structures with 1, *, inv, including groups.
|
||||
|
||||
import logic.eq logic.connectives
|
||||
import logic.eq
|
||||
import data.unit data.sigma data.prod
|
||||
import algebra.function algebra.binary
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
-- Various structures with 1, *, inv, including groups.
|
||||
|
||||
import logic.eq logic.connectives
|
||||
import logic.eq
|
||||
import data.unit data.sigma data.prod
|
||||
import algebra.function algebra.binary
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constants a b c : Prop
|
||||
axiom Ha : a
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constants a b c : Prop
|
||||
axiom Ha : a
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constants a b c : Prop
|
||||
axiom Ha : a
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constants a b c : Prop
|
||||
axiom Ha : a
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constant and : Prop → Prop → Prop
|
||||
infixl `∧`:25 := and
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
-- category
|
||||
|
||||
definition Prop := Type.{0}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
-- category
|
||||
|
||||
definition Prop := Type.{0}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
-- category
|
||||
|
||||
definition Prop := Type.{0}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
-- category
|
||||
|
||||
definition Prop := Type.{0}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive nat : Type :=
|
||||
zero : nat,
|
||||
succ : nat → nat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
|
||||
inductive or (A B : Prop) : Prop :=
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop := Type.{0}
|
||||
|
||||
inductive nat :=
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
inductive list (A : Type) : Type :=
|
||||
nil {} : list A,
|
||||
cons : A → list A → list A
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import logic tools.tactic
|
||||
import logic
|
||||
open tactic
|
||||
|
||||
theorem tst1 (a b : Prop) : a → b → b :=
|
||||
|
|
|
@ -11,7 +11,7 @@ definition is_nil {A : Type} (l : list A) : Prop
|
|||
:= list.rec true (fun h t r, false) l
|
||||
|
||||
theorem is_nil_nil (A : Type) : is_nil (@nil A)
|
||||
:= eq_true_elim (refl true)
|
||||
:= eq.true_elim (refl true)
|
||||
|
||||
theorem cons_ne_nil {A : Type} (a : A) (l : list A) : ¬ cons a l = nil
|
||||
:= not_intro (assume H : cons a l = nil,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic.eq
|
||||
import logic.eq
|
||||
variable {a : Type}
|
||||
|
||||
definition foo {A : Type} : A → A :=
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
constant N : Type.{1}
|
||||
constant and : Prop → Prop → Prop
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
context
|
||||
variable N : Type.{1}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
constant N : Type.{1}
|
||||
constant f : N → N → N → N
|
||||
constant g : N → N → N
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
constant nat : Type.{1}
|
||||
constant f : nat → nat
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
import logic
|
||||
import logic.eq
|
||||
|
||||
inductive sigma {A : Type} (B : A → Type) :=
|
||||
mk : Π (a : A), B a → sigma B
|
||||
inductive sigma2 {A : Type} (B : A → Type) :=
|
||||
mk : Π (a : A), B a → sigma2 B
|
||||
|
||||
#projections sigma :: proj1 proj2
|
||||
#projections sigma2 :: proj1 proj2
|
||||
|
||||
check sigma.proj1
|
||||
check sigma.proj2
|
||||
check sigma2.proj1
|
||||
check sigma2.proj2
|
||||
|
||||
variables {A : Type} {B : A → Type}
|
||||
variables (a : A) (b : B a)
|
||||
|
||||
theorem tst1 : sigma.proj1 (sigma.mk a b) = a :=
|
||||
theorem tst1 : sigma2.proj1 (sigma2.mk a b) = a :=
|
||||
rfl
|
||||
|
||||
theorem tst2 : sigma.proj2 (sigma.mk a b) = b :=
|
||||
theorem tst2 : sigma2.proj2 (sigma2.mk a b) = b :=
|
||||
rfl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic
|
||||
import logic
|
||||
open tactic
|
||||
|
||||
theorem foo1 (A : Type) (a b c : A) (Hab : a = b) (Hbc : b = c) : a = c :=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import data.sigma tools.tactic
|
||||
import data.sigma
|
||||
|
||||
namespace sigma
|
||||
namespace manual
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
context
|
||||
parameter A : Type
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Leonardo de Moura, Jeremy Avigad
|
||||
import logic.prop logic.inhabited logic.decidable
|
||||
open inhabited decidable
|
||||
|
||||
namespace play
|
||||
-- TODO: take this outside the namespace when the inductive package handles it better
|
||||
inductive sum (A B : Type) : Type :=
|
||||
inl : A → sum A B,
|
||||
|
@ -59,3 +58,4 @@ rec_on s1
|
|||
(take b2, show decidable (inr A b1 = inr A b2), from H2 b1 b2))
|
||||
|
||||
end sum
|
||||
end play
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition Prop : Type.{1} := Type.{0}
|
||||
print raw ((Prop))
|
||||
print raw Prop
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
constant int : Type.{1}
|
||||
constant nat : Type.{1}
|
||||
namespace int
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
precedence `+` : 65
|
||||
precedence `++` : 100
|
||||
constant N : Type.{1}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
definition bool : Type.{1} := Type.{0}
|
||||
definition and (p q : bool) : bool
|
||||
:= ∀ c : bool, (p → q → c) → c
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tools.tactic logic
|
||||
import logic
|
||||
open tactic
|
||||
|
||||
definition mytac := apply @and.intro; apply @eq.refl
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
prelude
|
||||
-- Porting Vladimir's file to Lean
|
||||
notation `assume` binders `,` r:(scoped f, f) := r
|
||||
notation `take` binders `,` r:(scoped f, f) := r
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||
-- Author: Jeremy Avigad
|
||||
-- Ported from Coq HoTT
|
||||
import general_notation
|
||||
|
||||
notation `assume` binders `,` r:(scoped f, f) := r
|
||||
notation `take` binders `,` r:(scoped f, f) := r
|
||||
|
||||
definition id {A : Type} (a : A) := a
|
||||
definition compose {A : Type} {B : Type} {C : Type} (g : B → C) (f : A → B) := λ x, g (f x)
|
||||
infixr ∘ := compose
|
||||
|
|
|
@ -1,2 +1,10 @@
|
|||
decidable : Prop → Type₁
|
||||
inhabited : Type → Type
|
||||
nonempty : Type → Prop
|
||||
point : Type → Type → Type
|
||||
well_founded : Π {A : Type}, (A → A → Prop) → Prop
|
||||
decidable : Prop → Type₁
|
||||
inhabited : Type → Type
|
||||
nonempty : Type → Prop
|
||||
point : Type → Type → Type
|
||||
well_founded : Π {A : Type}, (A → A → Prop) → Prop
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
constant N : Type.{1}
|
||||
prelude constant N : Type.{1}
|
||||
definition B : Type.{1} := Type.{0}
|
||||
constant ite : B → N → N → N
|
||||
constant and : B → B → B
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
constant A : Type.{1}
|
||||
prelude constant A : Type.{1}
|
||||
definition bool : Type.{1} := Type.{0}
|
||||
constant Exists (P : A → bool) : bool
|
||||
notation `exists` binders `,` b:(scoped b, Exists b) := b
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
precedence `+` : 65
|
||||
prelude precedence `+` : 65
|
||||
precedence `*` : 75
|
||||
constant N : Type.{1}
|
||||
check λ (f : N -> N -> N) (g : N → N → N) (infix + := f) (infix * := g) (x y : N), x+x*y
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
constant A : Type.{1}
|
||||
prelude constant A : Type.{1}
|
||||
constant f : A → A → A
|
||||
constant g : A → A → A
|
||||
precedence `+` : 65
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace foo
|
||||
prelude namespace foo
|
||||
constant A : Type.{1}
|
||||
constant a : A
|
||||
constant x : A
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
definition Prop : Type.{1} := Type.{0}
|
||||
prelude definition Prop : Type.{1} := Type.{0}
|
||||
constant N : Type.{1}
|
||||
check N
|
||||
constant a : N
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
definition Prop : Type.{1} := Type.{0}
|
||||
prelude definition Prop : Type.{1} := Type.{0}
|
||||
section
|
||||
variable {A : Type} -- Mark A as implicit parameter
|
||||
variable R : A → A → Prop
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
definition Prop : Type.{1} := Type.{0}
|
||||
prelude definition Prop : Type.{1} := Type.{0}
|
||||
constant and : Prop → Prop → Prop
|
||||
context
|
||||
parameter {A : Type} -- Mark A as implicit parameter
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
precedence `+` : 65
|
||||
prelude precedence `+` : 65
|
||||
precedence `*` : 75
|
||||
precedence `=` : 50
|
||||
precedence `≃` : 50
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue