statement stringlengths 2 515 | proof stringlengths 0 3.49k | type stringclasses 4
values | symbolic_name stringlengths 1 23 | library stringclasses 3
values | filename stringclasses 56
values | imports listlengths 0 0 | deps listlengths 0 7 | docstring stringclasses 1
value | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
Line/Test1 :
(->
[ty : (U 0 kan)]
[p : (line [_] ty)]
(path [_] ty (@ p 0) (@ p 1))) | by {
lam ty p => abs x => `(@ p x)
}. | theorem | Line/Test1 | test/success | test/success/lines.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Line/Trans :
(->
[ty : (U 0 kan)]
[p : (line [_] ty)]
[q : (line [_] ty)]
[eq : (= ty (@ p 1) (@ q 0))]
(path [_] ty (@ p 0) (@ q 1))) | by {
(lam ty p q eq => abs x =>
`(hcom 0~>1 ty (@ p x)
[x=0 [_] (@ p 0)]
[x=1 [y] (@ q y)]));
repeat {assumption || auto-step}
}. | theorem | Line/Trans | test/success | test/success/lines.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Line/Symm :
(->
[ty : (U 0 kan)]
[p : (line [_] ty)]
(path [_] ty (@ p 1) (@ p 0))) | by {
lam ty p => abs x =>
`(hcom 0~>1 ty (@ p 0)
[x=0 [y] (@ p y)]
[x=1 [_] (@ p 0)])
}. | theorem | Line/Symm | test/success | test/success/lines.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm1 :
(->
[p q : (U 0)]
p q p) | by {
lam p q a b => use a
}. | theorem | Thm1 | test/success | test/success/logical-investigations.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm2 :
(->
[p q r : (U 0)]
(-> p q)
(-> p q r)
p r) | by {
lam p q r f g a =>
use g [use a, use f [use a]]
}. | theorem | Thm2 | test/success | test/success/logical-investigations.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm3/low-level :
(->
[p q r : (U 0)]
(-> p q)
(-> q r)
(-> p r)) | by {
// fresh p q r pq qr x ->
repeat {refine fun/intro || id};
auto; with x qr pq r q p =>
elim qr; elim pq;
[ use x
, with _ y => use y
, use x
, with _ _ _ z => use z
]
}. | theorem | Thm3/low-level | test/success | test/success/logical-investigations.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm3/high-level :
(->
[p q r : (U 0)]
(-> p q)
(-> q r)
(-> p r)) | by {
lam p q r f g x =>
use g [use f [use x]]
}. | theorem | Thm3/high-level | test/success | test/success/logical-investigations.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Not(#A) | = (-> #A void) . | define | Not | test/success | test/success/logical-investigations.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm4 :
(-> [p q : (U 0)] (Not p) p q) | by {
lam p q r a =>
unfold Not;
let boom = r [use a];
elim boom
}. | theorem | Thm4 | test/success | test/success/logical-investigations.prl | [] | [
"Not"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm5 :
(-> [p : (U 0)] p (Not (Not p))) | by {
lam p a => unfold Not; lam r =>
use r [use a]
}. | theorem | Thm5 | test/success | test/success/logical-investigations.prl | [] | [
"Not"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Thm6(#A,#B) :
(-> [p q : (U 0)] (-> p q) (Not q) (Not p)) | by {
lam p q f g => unfold Not; lam a =>
use g [use f [use a]]
}. | theorem | Thm6 | test/success | test/success/logical-investigations.prl | [] | [
"Not"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
QueryGoalType(#t : [exp].tac) | = {
query gl <- concl;
match gl {
[a | #jdg{%a true} => (#t %a)]
}
}. | tactic | QueryGoalType | test/success | test/success/match.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
MatchGoal : (-> bool bool bool bool bool bool) | by {
repeat {
(QueryGoalType [ty] #tac{
match ty {
[a b | (-> [x:%a] (%b x)) => refine fun/intro; [id, auto]]
}
})
};
with _ _ y => use y
}. | theorem | MatchGoal | test/success | test/success/match.prl | [] | [
"QueryGoalType"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
One :
(int 1) in int | by {
auto
}. | theorem | One | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NegOne :
(int -1) in int | by {
auto
}. | theorem | NegOne | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NatOne :
(nat 1) in nat | by {
auto
}. | theorem | NatOne | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NatIsInt :
(-> [x : nat] (mem int (pos x))) | by {
lam x => auto
}. | theorem | NatIsInt | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Pred :
(-> nat nat) | by {
lam a =>
elim a;
[ `zero ];
[ with a' ind => `a' ]
}. | theorem | Pred | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus :
(-> nat nat nat) | by {
lam a =>
elim a;
[ lam x => use x
, with ind a' =>
lam x =>
let ih/x = ind [use x]; `(succ ih/x)
]
}. | theorem | Plus | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/wf :
Plus in (-> nat nat nat) | by {
auto
}. | theorem | Plus/wf | test/success | test/success/num.prl | [] | [
"Plus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/zeroL :
(-> [n : nat] (= nat ($ Plus (nat 0) n) n)) | by {
lam n => auto
}. | theorem | Plus/zeroL | test/success | test/success/num.prl | [] | [
"Plus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/zero/R :
(-> [n : nat] (= nat ($ Plus n (nat 0)) n)) | by {
lam n =>
elim n;
[ `ax
, with ind n' =>
rewrite ind at left;
[ with x => `(succ x) ];
auto
]
}. | theorem | Plus/zero/R | test/success | test/success/num.prl | [] | [
"Plus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/succ/L :
(-> [n m : nat] (= nat ($ Plus (succ n) m) (succ ($ Plus n m)))) | by {
lam n m => auto
}. | theorem | Plus/succ/L | test/success | test/success/num.prl | [] | [
"Plus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/succ/R :
(-> [n m : nat] (= nat ($ Plus n (succ m)) (succ ($ Plus n m)))) | by {
lam n m => elim n;
[ auto
, with n'/ih n' => rewrite ($ Plus/succ/L n' (succ m)) at left;
[ with x => `x
, rewrite ($ Plus/succ/L n' m) at right;
[ with x => `(succ x)
, rewrite n'/ih at left;
[ with x => `(succ x) ]
]
]
];
auto
}. | theorem | Plus/succ/R | test/success | test/success/num.prl | [] | [
"Plus",
"Plus/succ/L"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/test0 :
(-> [n m : nat] [eq : (= nat ($ Plus n zero) m)] (= nat n m)) | by {
lam n m eq =>
rewrite ($ Plus/zero/R n) in eq at left;
[ with x => `x ]; auto; use eq
}. | theorem | Plus/test0 | test/success | test/success/num.prl | [] | [
"Plus",
"Plus/zero/R"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Eq/sym :
(-> [ty : (U 0)] [a b : ty] (= ty a b) (= ty b a)) | by {
lam ty a b eq => symmetry; use eq
}. | theorem | Eq/sym | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Plus/comm :
(-> [n m : nat] (= nat ($ Plus n m) ($ Plus m n))) | by {
lam n m => elim n;
[ symmetry; `($ Plus/zero/R m)
, with n'/ih n' => rewrite ($ Plus/succ/L n' m) at left;
[ with x => `x
, rewrite n'/ih at left;
[ with x => `(succ x)
, symmetry; `($ Plus/succ/R m n')
]
]
];
auto
}. | theorem | Plus/comm | test/success | test/success/num.prl | [] | [
"Plus",
"Plus/succ/L",
"Plus/succ/R",
"Plus/zero/R"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NatSymm :
(->
[a b : nat]
(path [_] nat a b)
(path [_] nat b a)) | by {
lam a b pab =>
abs i =>
`(hcom 0~>1 nat a
[i=0 [j] (@ pab j)]
[i=1 [_] a])
}. | theorem | NatSymm | test/success | test/success/num.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IntPlus :
(-> int int int) | by {
lam a => elim a;
[ with n => elim n;
[ lam b => use b
, with ind a' => lam b => `($ IntSucc ($ ind b))
]
, with n => elim n;
[ lam b => `($ IntPred b)
, with ind a' => lam b => `($ IntPred ($ ind b))
]
]
}. | theorem | IntPlus | test/success | test/success/num.prl | [] | [
"IntPred",
"IntSucc"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Int4Plus3 :
($ IntPlus (int 4) (int 3)) = (int 7) in int | by { auto }. | theorem | Int4Plus3 | test/success | test/success/num.prl | [] | [
"IntPlus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Int-6Plus10 :
($ IntPlus (int -6) (int 10)) = (int 4) in int | by { auto }. | theorem | Int-6Plus10 | test/success | test/success/num.prl | [] | [
"IntPlus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Int-1Plus-9 :
($ IntPlus (int -1) (int -9)) = (int -10) in int | by { auto }. | theorem | Int-1Plus-9 | test/success | test/success/num.prl | [] | [
"IntPlus"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
PathApConst :
(-> (path [_] bool tt tt) bool) | by {
lam p => use p [`(dim 0)]
}. | theorem | PathApConst | test/success | test/success/path-ap-const.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
PrimitiveSequencingTest : (-> bool bool bool bool) | by {
repeat {refine fun/intro || id}; auto;
with z y x => use y
}. | theorem | PrimitiveSequencingTest | test/success | test/success/primitive-sequencing.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Pushout/Test0 :
(pushout record record bool [_] tuple [_] tuple) | by {
`(left tuple)
}. | theorem | Pushout/Test0 | test/success | test/success/pushout.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Pushout/Test1 :
(pushout bool bool bool [x] x [x] x) | by {
`(right tt)
}. | theorem | Pushout/Test1 | test/success | test/success/pushout.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Pushout/Test2 :
(-> dim (pushout bool bool bool [x] x [x] x)) | by {
abs u => `(glue u tt tt tt)
}. | theorem | Pushout/Test2 | test/success | test/success/pushout.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
S1' | = (pushout record record bool [_] tuple [_] tuple). | define | S1' | test/success | test/success/pushout.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
PushoutToS1 :
(-> S1' S1) | by {
lam p => elim p;
[ `base
, `base
, with c u:dim =>
elim c;
[ `(loop u)
, `base
]
];
auto
}. | theorem | PushoutToS1 | test/success | test/success/pushout.prl | [] | [
"S1'"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
PushoutToS1/Test0 :
(= (-> S1' S1) PushoutToS1 PushoutToS1) | by {
unfold PushoutToS1; // otherwise too easy
refine fun/eq/lam;
[ refine pushout/eq/pushout-rec; auto
, auto
]
}. | theorem | PushoutToS1/Test0 | test/success | test/success/pushout.prl | [] | [
"PushoutToS1",
"S1'"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
PushoutBetaEasiest(#i:lvl) :
(-> [a b c d : (U #i)] [w : d]
[u : dim] [x : a] [y : b] [z : c]
(= d (pushout-rec [_] d (glue u z x y) [_] w [_] w [_ _] w) w)) | by {
lam a b c d w => abs u => lam x y z =>
refine pushout/beta/glue;
auto
}. | theorem | PushoutBetaEasiest | test/success | test/success/pushout.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
PushoutBetaEasier(#i:lvl) :
(-> [a b c : (U #i)] [f : (-> c a)] [g : (-> c b)]
[d : (-> (pushout a b c [z] ($ f z) [z] ($ g z)) (U #i))]
[wl : (-> [x : a] ($ d (left x)))] [wr : (-> [y : b] ($ d (right y)))]
[wg : (-> [z : c] (path [v] ($ d (glue v z ($ f z) ($ g z))) ($ wl ($ f z)) ($ wr ($ g z))))... | by {
lam a b c f g d wl wr wg => abs u => lam m =>
refine pushout/beta/glue;
auto
}. | theorem | PushoutBetaEasier | test/success | test/success/pushout.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTypeTest :
(record [a : bool] [b : (path [_] bool a a)] [c : bool] [d : S1]) type | by {
auto
}. | theorem | RecordTypeTest | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest0 :
tuple in record | by {
auto
}. | theorem | RecordTest0 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest1 :
(tuple [a tt]) in (record [a : bool]) | by {
auto
}. | theorem | RecordTest1 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest2 :
(tuple [a tt] [b tuple]) in (record [b : record] [a : bool]) | by {
auto
}. | theorem | RecordTest2 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest3 :
(tuple [a tt] [b ff]) in (record [b a : bool]) | by {
auto
}. | theorem | RecordTest3 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest4 :
(! a (tuple [a tt] [b ff])) = tt in bool | by {
auto
}. | theorem | RecordTest4 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest5(#p) :
(-> [p : record] (= record p tuple)) | by {
lam _ => auto
}. | theorem | RecordTest5 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest6 :
(->
[p : (record [a : bool] [b c : record])]
bool) | by {
lam {a = a} => use a
}. | theorem | RecordTest6 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordTest7 :
(record
[a : S1]
[b : (path [_] S1 a a)]) | by {
{a = `base, b = abs i => `(loop i)}
}. | theorem | RecordTest7 | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
RecordElimTest :
(->
(record
[b : bool]
[c : S1]
[p : (path [_] bool b b)])
(* [b : bool] (path [_] bool b b))) | by {
lam {b = welp, p = hello} =>
{use welp, use hello}
}. | theorem | RecordElimTest | test/success | test/success/record.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Fcom/trans3 :
(-> [a b c d : S1]
(path [_] S1 a b)
(path [_] S1 a c)
(path [_] S1 b d)
(path [_] S1 c d)) | by {
lam a b c d pab pac pbd =>
abs i => `(fcom 0~>1 (@ pab i) [i=0 [j] (@ pac j)] [i=1 [j] (@ pbd j)])
}. | theorem | Fcom/trans3 | test/success | test/success/S1-fcom.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Fcom/trans2 :
(-> [a b c : S1]
(path [_] S1 a b)
(path [_] S1 b c)
(path [_] S1 a c)) | by {
lam a b c pab pbc =>
abs i => `(fcom 0~>1 (@ pab i) [i=0 [_] a] [i=1 [j] (@ pbc j)])
}. | theorem | Fcom/trans2 | test/success | test/success/S1-fcom.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Fcom/symm :
(-> [a b : S1]
(path [_] S1 a b)
(path [_] S1 b a)) | by {
lam a b pab =>
abs i => `(fcom 0~>1 a [i=0 [j] (@ pab j)] [i=1 [_] a])
}. | theorem | Fcom/symm | test/success | test/success/S1-fcom.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Tube :
(->
[x : S1]
(= S1 (fcom 0~>1 x [1=1 [_] x] [0=0 [_] x]) x)) | by {
lam x => auto
}. | theorem | Tube | test/success | test/success/S1-fcom.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
TrueByEvaluation :
(fcom 0~>0 base) in S1 | by {
auto
}. | theorem | TrueByEvaluation | test/success | test/success/S1-fcom.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Loop :
(path [_] S1 base base) | by {
abs u => `(loop u)
}. | theorem | Loop | test/success | test/success/S1.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
LoopBetaEasiest(#i:lvl) :
(-> [u : dim] [a : (U #i)] [x : a]
(= a (S1-rec [_] a (loop u) x [_] x) x)) | by {
abs u => lam a x =>
refine s1/beta/loop;
auto
}. | theorem | LoopBetaEasiest | test/success | test/success/S1.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
LoopBetaEasier(#i:lvl) :
(-> [u : dim] [a : (-> S1 (U #i))]
[b : ($ a base)] [l : (path [v] ($ a (loop v)) b b)]
(= ($ a (loop u)) (S1-rec [x] a (loop u) b [v] (@ l v)) (@ l u))) | by {
abs u => lam a b l =>
refine s1/beta/loop;
auto
}. | theorem | LoopBetaEasier | test/success | test/success/S1.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Cmp(#m, #n) | =
(lam [x] ($ #m ($ #n x)))
. | define | Cmp | test/success | test/success/strict-bool.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Bool/Not | =
(lam [x] (if [_] bool x ff tt))
. | define | Bool/Not | test/success | test/success/strict-bool.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Bool/Not-Not-Id :
(Cmp Bool/Not Bool/Not) = (lam [x] x) in (-> bool bool) | by {
auto
}. | theorem | Bool/Not-Not-Id | test/success | test/success/strict-bool.prl | [] | [
"Bool/Not",
"Cmp"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
SBool/Not-Not-Id-Path :
(path
[_] (-> bool bool)
(Cmp Bool/Not Bool/Not)
(lam [x] x)) | by {
abs i => lam x => use x
}. | theorem | SBool/Not-Not-Id-Path | test/success | test/success/strict-bool.prl | [] | [
"Bool/Not",
"Cmp"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Times(#A, #B) | =
(* #A #B)
. | define | Times | test/success | test/success/unfold.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Proj1(#z) | = {
let {x} = #z;
use x
}. | tactic | Proj1 | test/success | test/success/unfold.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Proj2(#z) | = {
let {welp, x} = #z;
use x
}. | tactic | Proj2 | test/success | test/success/unfold.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Times/Proj :
(-> [ty : (U 0)] (Times bool ty) ty) | by {
lam ty x => (Proj2 x)
}. | theorem | Times/Proj | test/success | test/success/unfold.prl | [] | [
"Proj2",
"Times"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Univ0(#i:lvl, #j:lvl) :
(U #i) in (U (++ (lmax #i #j))) | by {
auto
}. | theorem | Univ0 | test/success | test/success/universes.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Univ1(#i:lvl) :
nat in (U #i discrete) | by {
auto
}. | theorem | Univ1 | test/success | test/success/universes.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Univ2 :
(->
[a : (U 0 discrete)]
(= (U 1 kan) a a)) | by {
lam a => auto
}. | theorem | Univ2 | test/success | test/success/universes.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Monoid(#i:lvl) : (U (++ #i)) | by {
`(record
[ob : (U #i)]
[one : ob]
[mul : (-> ob ob ob)]
[idn/l : (-> [m : ob] (= ob ($ mul one m) m))]
[idn/r : (-> [m : ob] (= ob ($ mul m one) m))]
[assoc :
(->
[l m n : ob]
(= ob
($ mul l ($ mul m n))
($ mul ($ mul m n) l)))])
}. | theorem | Monoid | test/success | test/success/universes.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Id | = (lam [a] a). | define | Id | test/success | test/success/V-types.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdIsEquiv(#l:lvl) :
(-> [ty : (U #l hcom)] (IsEquiv ty ty Id)) | by {
lam ty a =>
{ {use a, abs _ => use a}
, lam {_,c'} => abs i =>
{ `(hcom 1~>0 ty a
[i=0 [j] (@ c' j)]
[i=1 [j] a])
, abs j =>
`(hcom 1~>j ty a
[i=0 [j] (@ c' j)]
[i=1 [j] a])
}
}
}. | theorem | IdIsEquiv | test/success | test/success/V-types.prl | [] | [
"Id",
"IsEquiv"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdEquiv(#l:lvl) :
(-> [ty : (U #l hcom)] (Equiv ty ty)) | by {
lam ty =>
{`Id, use (IdIsEquiv #l) [use ty]}
}. | theorem | IdEquiv | test/success | test/success/V-types.prl | [] | [
"Equiv",
"Id",
"IdIsEquiv"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdV(#i:dim, #l:lvl, #ty) | =
(V #i #ty #ty ($ (IdEquiv #l) #ty))
. | define | IdV | test/success | test/success/V-types.prl | [] | [
"IdEquiv"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdV/Wf(#l:lvl) :
(->
[i : dim]
[ty : (U #l hcom)]
(mem (U #l) (IdV i #l ty))) | by {
abs i => lam ty => auto
}. | theorem | IdV/Wf | test/success | test/success/V-types.prl | [] | [
"IdV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdV/Test0(#l:lvl) :
(->
[i : dim]
[ty : (U #l hcom)]
[a : ty]
(mem (IdV i #l ty) (Vin i a a))) | by {
abs i => lam ty a => auto
}. | theorem | IdV/Test0 | test/success | test/success/V-types.prl | [] | [
"IdV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdV/Test1(#l:lvl) :
(->
[ty : (U #l hcom)]
[a : ty]
(= ty (Vproj (dim 0) (Vin (dim 0) a a) Id) a)) | by {
lam ty a => auto
}. | theorem | IdV/Test1 | test/success | test/success/V-types.prl | [] | [
"Id"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
IdV/Test2(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
(= ty (coe 0~>1 [x] (IdV x #l ty) a)
(coe 0~>1 [_] ty a))) | by {
lam ty a => auto
}. | theorem | IdV/Test2 | test/success | test/success/V-types.prl | [] | [
"IdV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Not | = (lam [b] (if [_] bool b ff tt)). | define | Not | test/success | test/success/V-types.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Bool/reflect :
(->
[a b : bool]
[p : (path [_] bool a b)]
(= bool a b)) | by {
lam a b p => `(coe 0~>1 [x] (= bool a (@ p x)) ax)
}. | theorem | Bool/reflect | test/success | test/success/V-types.prl | [] | [] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
Bool/contra/inverse (#p:exp) | = {
query gl <- concl;
match gl {
[a b | #jdg{%a = %b in bool} =>
claim eq : (= bool %b %a) by {use Bool/reflect [`%b, `%a, `#p]; auto};
symmetry; auto
]
[a | %[a:jdg] => id]
}
}. | tactic | Bool/contra/inverse | test/success | test/success/V-types.prl | [] | [
"Bool/reflect"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotIsEquiv :
(IsEquiv bool bool Not) | by {
lam b =>
{ {`($ Not b), abs _ => use b}
, lam {_,p'} =>
(abs i =>
{ `($ Not (hcom 1~>0 bool b
[i=0 [j] (@ p' j)]
[i=1 [j] b]))
, abs j =>
`(hcom 1~>j bool b
[i=0 [j] (@ p' j)]
[i=1 [j] b])
}
); ... | theorem | NotIsEquiv | test/success | test/success/V-types.prl | [] | [
"Bool/contra/inverse",
"IsEquiv",
"Not"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotEquiv :
(Equiv bool bool) | by {
{`Not, `NotIsEquiv}
}. | theorem | NotEquiv | test/success | test/success/V-types.prl | [] | [
"Equiv",
"Not",
"NotIsEquiv"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotV(#i:dim) | = (V #i bool bool NotEquiv). | define | NotV | test/success | test/success/V-types.prl | [] | [
"NotEquiv"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotV/Wf :
(-> [i : dim] (mem (U 0 kan) (NotV i))) | by {
abs i => auto
}. | theorem | NotV/Wf | test/success | test/success/V-types.prl | [] | [
"NotV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotV/Test0 :
(->
[i : dim]
[a : bool]
(mem (NotV i) (Vin i ($ Not a) a))) | by {
abs i => lam a => auto
}. | theorem | NotV/Test0 | test/success | test/success/V-types.prl | [] | [
"Not",
"NotV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotV/Test1 :
(->
[a : bool]
(= bool (coe 0~>1 [x] (NotV x) a) ($ Not a))) | by {
lam a => auto
}. | theorem | NotV/Test1 | test/success | test/success/V-types.prl | [] | [
"Not",
"NotV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c | |
NotV/Test2 :
(->
[a : bool]
(= bool (coe 1~>0 [x] (NotV x) a) ($ Not a))) | by {
lam a => auto
}. | theorem | NotV/Test2 | test/success | test/success/V-types.prl | [] | [
"Not",
"NotV"
] | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.