Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. • 103 items • Updated • 3
fact stringlengths 17 3.77k | 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 0
values | line_start int64 1 323 | line_end int64 1 337 | has_proof bool 2
classes | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Category(#i:lvl) : (U (++ #i)) by {
`(record
[ob : (U #i)]
[hom : (-> ob ob (U #i))]
[idn : (-> [a : ob] ($ hom a a))]
[cmp : (-> [a b c : ob] ($ hom b c) ($ hom a b) ($ hom a c))]
[idn/l :
(->
[a b : ob]
[f : ($ hom a b)]
(= ($ hom a b)
($ cmp a b b ($ ... | Category(#i:lvl) : (U (++ #i)) | by {
`(record
[ob : (U #i)]
[hom : (-> ob ob (U #i))]
[idn : (-> [a : ob] ($ hom a a))]
[cmp : (-> [a b c : ob] ($ hom b c) ($ hom a b) ($ hom a c))]
[idn/l :
(->
[a b : ob]
[f : ($ hom a b)]
(= ($ hom a b)
($ cmp a b b ($ idn b) f)
f))]
[i... | theorem | Category | example | example/category.prl | [] | [] | null | 1 | 31 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Test(#l:lvl) : (Category (++#l)) by {
{ ob = `(U #l)
, hom = lam ty/a ty/b => `(-> ty/a ty/b)
, idn = lam ty/a x => `x
, cmp = lam ty/a ty/b ty/a f g x => use f [use g [`x]]
, idn/l = lam _ _ _ => auto
, idn/r = lam _ _ _ => auto
, assoc = lam _ _ _ _ _ _ _ => auto
}
}. | Test(#l:lvl) : (Category (++#l)) | by {
{ ob = `(U #l)
, hom = lam ty/a ty/b => `(-> ty/a ty/b)
, idn = lam ty/a x => `x
, cmp = lam ty/a ty/b ty/a f g x => use f [use g [`x]]
, idn/l = lam _ _ _ => auto
, idn/r = lam _ _ _ => auto
, assoc = lam _ _ _ _ _ _ _ => auto
}
}. | theorem | Test | example | example/category.prl | [] | [
"Category"
] | null | 33 | 42 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Connection/And(#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(path [i] (path [_] ty a (@ p i)) (abs [_] a) p))
by {
lam ty a b p =>
abs i j =>
`(hcom 0~>1 ty a
[i=0 [k] (hcom 1~>0 ty (@ p k) [k=0 [_] a] [k=1 [l] (@ p l)])]
[i=1 [k] (hcom 1~>j ty (@ p k) [k... | Connection/And(#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(path [i] (path [_] ty a (@ p i)) (abs [_] a) p)) | by {
lam ty a b p =>
abs i j =>
`(hcom 0~>1 ty a
[i=0 [k] (hcom 1~>0 ty (@ p k) [k=0 [_] a] [k=1 [l] (@ p l)])]
[i=1 [k] (hcom 1~>j ty (@ p k) [k=0 [_] a] [k=1 [l] (@ p l)])]
[j=0 [k] (hcom 1~>0 ty (@ p k) [k=0 [_] a] [k=1 [l] (@ p l)])]
[j=1 [k] (hcom 1~>i ty (@ p k) [k=0 [_... | theorem | Connection/And | example | example/connection.prl | [] | [] | null | 1 | 16 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Connection/And/Diagonal (#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(= (path [_] ty a b) (abs [i] (@ ($ (Connection/And #l) ty a b p) i i)) p))
by {
lam ty a b p => unfold Connection/And; auto
}. | Connection/And/Diagonal (#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(= (path [_] ty a b) (abs [i] (@ ($ (Connection/And #l) ty a b p) i i)) p)) | by {
lam ty a b p => unfold Connection/And; auto
}. | theorem | Connection/And/Diagonal | example | example/connection.prl | [] | [
"Connection/And"
] | null | 18 | 26 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Connection/Or(#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(path [i] (path [_] ty (@ p i) b) p (abs [_] b)))
by {
lam ty a b p =>
abs i j =>
`(hcom 1~>0 ty b
[i=0 [k] (hcom 0~>j ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[i=1 [k] (hcom 0~>1 ty (@ p k) [k=0 [w... | Connection/Or(#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(path [i] (path [_] ty (@ p i) b) p (abs [_] b))) | by {
lam ty a b p =>
abs i j =>
`(hcom 1~>0 ty b
[i=0 [k] (hcom 0~>j ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[i=1 [k] (hcom 0~>1 ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[j=0 [k] (hcom 0~>i ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[j=1 [k] (hcom 0~>1 ty (@ p k) [k=0 [w] (@ p... | theorem | Connection/Or | example | example/connection.prl | [] | [] | null | 28 | 43 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Connection/Or/Diagonal (#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(= (path [_] ty a b) (abs [i] (@ ($ (Connection/Or #l) ty a b p) i i)) p))
by {
lam ty a b p => unfold Connection/Or; auto
}. | Connection/Or/Diagonal (#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(= (path [_] ty a b) (abs [i] (@ ($ (Connection/Or #l) ty a b p) i i)) p)) | by {
lam ty a b p => unfold Connection/Or; auto
}. | theorem | Connection/Or/Diagonal | example | example/connection.prl | [] | [
"Connection/Or"
] | null | 45 | 53 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Refl(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
(path [_] ty a a))
by {
lam ty a => abs _ => `a
}. | Refl(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
(path [_] ty a a)) | by {
lam ty a => abs _ => `a
}. | theorem | Refl | example | example/groupoid.prl | [] | [] | null | 3 | 10 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Symm(#l:lvl) :
(->
[ty : (U #l 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)])
}. | Symm(#l:lvl) :
(->
[ty : (U #l 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 | Symm | example | example/groupoid.prl | [] | [] | null | 12 | 22 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Trans(#l:lvl) :
(->
[ty : (U #l 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 [z] (@ q z)]));
auto; assumption
}. | Trans(#l:lvl) :
(->
[ty : (U #l 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 [z] (@ q z)]));
auto; assumption
}. | theorem | Trans | example | example/groupoid.prl | [] | [] | null | 24 | 37 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Symm/Unit(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
(path [_]
(path [_] ty a a)
(abs [_] a)
($ (Symm #l) ty (abs [_] a))))
by {
lam ty a =>
abs y x =>
`(hcom 0~>y ty a [x=0 [_] a] [x=1 [_] a])
}. | Symm/Unit(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
(path [_]
(path [_] ty a a)
(abs [_] a)
($ (Symm #l) ty (abs [_] a)))) | by {
lam ty a =>
abs y x =>
`(hcom 0~>y ty a [x=0 [_] a] [x=1 [_] a])
}. | theorem | Symm/Unit | example | example/groupoid.prl | [] | [
"Symm"
] | null | 39 | 51 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Trans/Unit/R(#l:lvl) :
(->
[ty : (U #l kan)]
[p : (line [_] ty)]
(path [_]
(path [_] ty (@ p 0) (@ p 1))
p
($ (Trans #l) ty p (abs [_] (@ p 1)) ax)))
by {
lam ty p =>
(abs y x =>
`(hcom 0~>y ty (@ p x) [x=0 [_] (@ p 0)] [x=1 [_] (@ p 1)]));
refine path/eq/from-line; auto
}. | Trans/Unit/R(#l:lvl) :
(->
[ty : (U #l kan)]
[p : (line [_] ty)]
(path [_]
(path [_] ty (@ p 0) (@ p 1))
p
($ (Trans #l) ty p (abs [_] (@ p 1)) ax))) | by {
lam ty p =>
(abs y x =>
`(hcom 0~>y ty (@ p x) [x=0 [_] (@ p 0)] [x=1 [_] (@ p 1)]));
refine path/eq/from-line; auto
}. | theorem | Trans/Unit/R | example | example/groupoid.prl | [] | [
"Trans"
] | null | 53 | 67 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Trans/Sym/R(#l:lvl) :
(->
[ty : (U #l kan)]
[p : (line [_] ty)]
(path [_]
(path [_] ty (@ p 0) (@ p 0))
(abs [_] (@ p 0))
($ (Trans #l) ty p ($ (Symm #l) ty p) ax)))
by {
lam ty p =>
(abs z x =>
`(hcom 0~>1 ty (@ p x)
[x=0 [_] (@ p 0)]
[x=1 [y] (@ ($ (Symm #l) ty p) y)]
... | Trans/Sym/R(#l:lvl) :
(->
[ty : (U #l kan)]
[p : (line [_] ty)]
(path [_]
(path [_] ty (@ p 0) (@ p 0))
(abs [_] (@ p 0))
($ (Trans #l) ty p ($ (Symm #l) ty p) ax))) | by {
lam ty p =>
(abs z x =>
`(hcom 0~>1 ty (@ p x)
[x=0 [_] (@ p 0)]
[x=1 [y] (@ ($ (Symm #l) ty p) y)]
[z=0 [y] (hcom 0~>x ty (@ p 0) [y=0 [x] (@ p x)] [y=1 [_] (@ p 0)])]
[z=1 [y]
(hcom 0~>y ty (@ p x)
[x=0 [_] (@ p 0)]
[x=1 [y] (@ ($ (Symm #l) ty p) y)])])... | theorem | Trans/Sym/R | example | example/groupoid.prl | [] | [
"Symm",
"Trans"
] | null | 70 | 90 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
DSymm(#l:lvl) :
(->
[ty : (line [_] (U #l kan))]
[p : (line [x] (@ ty x))]
(path [x]
(@ ($ (Symm (++ #l)) (U #l kan) ty) x)
(@ p 1)
(@ p 0)))
by {
lam ty p =>
(abs x =>
`(com 0~>1
[y] (hcom 0~>y (U #l kan) (@ ty 0) [x=0 [y] (@ ty y)] [x=1 [_] (@ ty 0)])
(@ p 0)
[x=0 [y] (@ p ... | DSymm(#l:lvl) :
(->
[ty : (line [_] (U #l kan))]
[p : (line [x] (@ ty x))]
(path [x]
(@ ($ (Symm (++ #l)) (U #l kan) ty) x)
(@ p 1)
(@ p 0))) | by {
lam ty p =>
(abs x =>
`(com 0~>1
[y] (hcom 0~>y (U #l kan) (@ ty 0) [x=0 [y] (@ ty y)] [x=1 [_] (@ ty 0)])
(@ p 0)
[x=0 [y] (@ p y)]
[x=1 [_] (@ p 0)]));
unfold Symm; auto
}. | theorem | DSymm | example | example/groupoid.prl | [] | [
"Symm"
] | null | 94 | 111 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
HasAllPathsTo (#C,#c) = (-> [c' : #C] (path [_] #C c' #c)). | HasAllPathsTo (#C,#c) | = (-> [c' : #C] (path [_] #C c' #c)). | define | HasAllPathsTo | example | example/hlevels.prl | [] | [] | null | 1 | 1 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsContr (#C) = (* [c : #C] (HasAllPathsTo #C c)). | IsContr (#C) | = (* [c : #C] (HasAllPathsTo #C c)). | define | IsContr | example | example/hlevels.prl | [] | [
"HasAllPathsTo"
] | null | 2 | 2 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsProp (#A) = (-> [a b : #A] (path [_] #A a b)). | IsProp (#A) | = (-> [a b : #A] (path [_] #A a b)). | define | IsProp | example | example/hlevels.prl | [] | [] | null | 3 | 3 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsSet (#A) = (-> [a b : #A] (IsProp (path [_] #A a b))). | IsSet (#A) | = (-> [a b : #A] (IsProp (path [_] #A a b))). | define | IsSet | example | example/hlevels.prl | [] | [
"IsProp"
] | null | 4 | 4 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
InhPropIsContr(#l:lvl) :
(->
[ty : (U #l kan)]
[h : (IsProp ty)]
[a : ty]
(IsContr ty))
by {
lam ty h a => {use a, lam x => `($ h x a)}
}. | InhPropIsContr(#l:lvl) :
(->
[ty : (U #l kan)]
[h : (IsProp ty)]
[a : ty]
(IsContr ty)) | by {
lam ty h a => {use a, lam x => `($ h x a)}
}. | theorem | InhPropIsContr | example | example/hlevels.prl | [] | [
"IsContr",
"IsProp"
] | null | 6 | 14 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
PropPi(#l:lvl) :
(->
[tyA : (U #l kan)]
[tyB : (-> tyA (U #l kan))]
[h : (-> [x : tyA] (IsProp ($ tyB x)))]
(IsProp (-> [x : tyA] ($ tyB x))))
by {
lam tyA tyB h f g => abs i => lam x => `(@ ($ h x ($ f x) ($ g x)) i)
}. | PropPi(#l:lvl) :
(->
[tyA : (U #l kan)]
[tyB : (-> tyA (U #l kan))]
[h : (-> [x : tyA] (IsProp ($ tyB x)))]
(IsProp (-> [x : tyA] ($ tyB x)))) | by {
lam tyA tyB h f g => abs i => lam x => `(@ ($ h x ($ f x) ($ g x)) i)
}. | theorem | PropPi | example | example/hlevels.prl | [] | [
"IsProp"
] | null | 16 | 24 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
PropSet(#l:lvl) :
(->
[tyA : (U #l kan)]
[h : (IsProp tyA)]
(IsSet tyA))
by {
lam tyA h a b p q =>
abs j i =>
`(hcom 0~>1 tyA a
[i=0 [k] (@ ($ h a a) k)]
[i=1 [k] (@ ($ h a b) k)]
[j=0 [k] (@ ($ h a (@ p i)) k)]
[j=1 [k] (@ ($ h a (@ q i)) k)])
}. | PropSet(#l:lvl) :
(->
[tyA : (U #l kan)]
[h : (IsProp tyA)]
(IsSet tyA)) | by {
lam tyA h a b p q =>
abs j i =>
`(hcom 0~>1 tyA a
[i=0 [k] (@ ($ h a a) k)]
[i=1 [k] (@ ($ h a b) k)]
[j=0 [k] (@ ($ h a (@ p i)) k)]
[j=1 [k] (@ ($ h a (@ q i)) k)])
}. | theorem | PropSet | example | example/hlevels.prl | [] | [
"IsProp",
"IsSet"
] | null | 26 | 39 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsPropIsProp(#l:lvl) :
(->
[tyA : (U #l kan)]
(IsProp (IsProp tyA)))
by {
lam tyA h1 h2 =>
abs i => lam a b =>
use (PropSet #l) [`tyA, `h1, `a, `b, `($ h1 a b), `($ h2 a b), `i]
}. | IsPropIsProp(#l:lvl) :
(->
[tyA : (U #l kan)]
(IsProp (IsProp tyA))) | by {
lam tyA h1 h2 =>
abs i => lam a b =>
use (PropSet #l) [`tyA, `h1, `a, `b, `($ h1 a b), `($ h2 a b), `i]
}. | theorem | IsPropIsProp | example | example/hlevels.prl | [] | [
"IsProp",
"PropSet"
] | null | 41 | 49 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsPropIsSet(#l:lvl) :
(->
[tyA : (U #l kan)]
(IsProp (IsSet tyA)))
by {
lam tyA h1 h2 =>
abs i => lam a b =>
use (IsPropIsProp #l) [`(path [_] tyA a b), `($ h1 a b), `($ h2 a b), `i]
}. | IsPropIsSet(#l:lvl) :
(->
[tyA : (U #l kan)]
(IsProp (IsSet tyA))) | by {
lam tyA h1 h2 =>
abs i => lam a b =>
use (IsPropIsProp #l) [`(path [_] tyA a b), `($ h1 a b), `($ h2 a b), `i]
}. | theorem | IsPropIsSet | example | example/hlevels.prl | [] | [
"IsProp",
"IsPropIsProp",
"IsSet"
] | null | 51 | 59 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
FunToPair :
(->
[ty : (U 0 kan)]
(-> bool ty)
(* ty ty))
by {
lam ty fun =>
{`($ fun tt), `($ fun ff)}
}. | FunToPair :
(->
[ty : (U 0 kan)]
(-> bool ty)
(* ty ty)) | by {
lam ty fun =>
{`($ fun tt), `($ fun ff)}
}. | theorem | FunToPair | example | example/invariance.prl | [] | [] | null | 9 | 17 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
HasAllPathsTo (#C,#c) = (-> [c' : #C] (path [_] #C c' #c)). | HasAllPathsTo (#C,#c) | = (-> [c' : #C] (path [_] #C c' #c)). | define | HasAllPathsTo | example | example/invariance.prl | [] | [] | null | 21 | 21 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsContr (#C) = (* [c : #C] (HasAllPathsTo #C c)). | IsContr (#C) | = (* [c : #C] (HasAllPathsTo #C c)). | define | IsContr | example | example/invariance.prl | [] | [
"HasAllPathsTo"
] | null | 22 | 22 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Fiber (#A,#B,#f,#b) = (* [a : #A] (path [_] #B ($ #f a) #b)). | Fiber (#A,#B,#f,#b) | = (* [a : #A] (path [_] #B ($ #f a) #b)). | define | Fiber | example | example/invariance.prl | [] | [] | null | 23 | 23 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsEquiv (#A,#B,#f) = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | IsEquiv (#A,#B,#f) | = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | define | IsEquiv | example | example/invariance.prl | [] | [
"Fiber",
"IsContr"
] | null | 24 | 24 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Equiv (#A,#B) = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | Equiv (#A,#B) | = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | define | Equiv | example | example/invariance.prl | [] | [
"IsEquiv"
] | null | 25 | 25 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
WeakConnection(#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(path [i] (path [_] ty (@ p i) b) p (abs [_] b)))
by {
(lam ty a b p =>
abs i j =>
`(hcom 1~>0 ty b
[i=0 [k] (hcom 0~>j ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[i=1 [k] (hcom 0~>1 ty (@ p k) [... | WeakConnection(#l:lvl) :
(->
[ty : (U #l hcom)]
[a b : ty]
[p : (path [_] ty a b)]
(path [i] (path [_] ty (@ p i) b) p (abs [_] b))) | by {
(lam ty a b p =>
abs i j =>
`(hcom 1~>0 ty b
[i=0 [k] (hcom 0~>j ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[i=1 [k] (hcom 0~>1 ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[j=0 [k] (hcom 0~>i ty (@ p k) [k=0 [w] (@ p w)] [k=1 [_] b])]
[j=1 [k] (hcom 0~>1 ty (@ p k) [k=0 [... | theorem | WeakConnection | example | example/invariance.prl | [] | [] | null | 27 | 41 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
GetEndpoints(#p, #t:[exp,exp].tac) = {
query pty <- #p;
match pty {
[ty l r | #jdg{(path [_] %ty %l %r)} =>
claim p/0 : (@ #p 0) = %l in %ty by {auto};
claim p/1 : (@ #p 1) = %r in %ty by {auto};
(#t p/0 p/1)
]
}
}. | GetEndpoints(#p, #t:[exp,exp].tac) | = {
query pty <- #p;
match pty {
[ty l r | #jdg{(path [_] %ty %l %r)} =>
claim p/0 : (@ #p 0) = %l in %ty by {auto};
claim p/1 : (@ #p 1) = %r in %ty by {auto};
(#t p/0 p/1)
]
}
}. | tactic | GetEndpoints | example | example/invariance.prl | [] | [] | null | 43 | 52 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
FunToPairIsEquiv :
(->
[ty : (U 0 kan)]
(IsEquiv (-> bool ty) (* ty ty) ($ FunToPair ty)))
by {
lam ty pair =>
{ { lam b => if b then `(!proj1 pair) else `(!proj2 pair)
, abs _ => `pair }
, unfold Fiber;
lam {fun,p} =>
(GetEndpoints p [p/0 p/1] #tac{
(abs x =>
{lam b => if b the... | FunToPairIsEquiv :
(->
[ty : (U 0 kan)]
(IsEquiv (-> bool ty) (* ty ty) ($ FunToPair ty))) | by {
lam ty pair =>
{ { lam b => if b then `(!proj1 pair) else `(!proj2 pair)
, abs _ => `pair }
, unfold Fiber;
lam {fun,p} =>
(GetEndpoints p [p/0 p/1] #tac{
(abs x =>
{lam b => if b then `(!proj1 (@ p x)) else `(!proj2 (@ p x)),
abs y =>
`(@ ($ (WeakConnection #lv... | theorem | FunToPairIsEquiv | example | example/invariance.prl | [] | [
"Fiber",
"FunToPair",
"GetEndpoints",
"IsEquiv",
"WeakConnection"
] | null | 54 | 83 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
FunEqPair :
(->
[ty : (U 0 kan)]
(path [_] (U 0 kan) (-> bool ty) (* ty ty)))
by {
lam ty => abs x =>
`(V x (-> bool ty) (* ty ty)
(tuple [proj1 ($ FunToPair ty)] [proj2 ($ FunToPairIsEquiv ty)]))
}. | FunEqPair :
(->
[ty : (U 0 kan)]
(path [_] (U 0 kan) (-> bool ty) (* ty ty))) | by {
lam ty => abs x =>
`(V x (-> bool ty) (* ty ty)
(tuple [proj1 ($ FunToPair ty)] [proj2 ($ FunToPairIsEquiv ty)]))
}. | theorem | FunEqPair | example | example/invariance.prl | [] | [
"FunToPair",
"FunToPairIsEquiv"
] | null | 88 | 96 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
CoerceFunToPair :
(->
[ty : (U 0 kan)]
(-> bool ty)
(* ty ty))
by {
lam ty fun =>
`(coe 0~>1 [x] (@ ($ FunEqPair ty) x) fun)
}. | CoerceFunToPair :
(->
[ty : (U 0 kan)]
(-> bool ty)
(* ty ty)) | by {
lam ty fun =>
`(coe 0~>1 [x] (@ ($ FunEqPair ty) x) fun)
}. | theorem | CoerceFunToPair | example | example/invariance.prl | [] | [
"FunEqPair"
] | null | 99 | 107 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
ComputeCoercion :
(=
(* bool bool)
($ CoerceFunToPair bool (lam [b] b))
(tuple [proj1 tt] [proj2 ff]))
by {
auto
}. | ComputeCoercion :
(=
(* bool bool)
($ CoerceFunToPair bool (lam [b] b))
(tuple [proj1 tt] [proj2 ff])) | by {
auto
}. | theorem | ComputeCoercion | example | example/invariance.prl | [] | [
"CoerceFunToPair"
] | null | 109 | 116 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
SwapPair :
(->
[ty : (U 0 kan)]
(* ty ty)
(* ty ty))
by {
lam ty {p1,p2} => {`p2,`p1}
}. | SwapPair :
(->
[ty : (U 0 kan)]
(* ty ty)
(* ty ty)) | by {
lam ty {p1,p2} => {`p2,`p1}
}. | theorem | SwapPair | example | example/invariance.prl | [] | [] | null | 120 | 127 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
SwapCoe(#ty,#r:dim) =
(coe 1~>#r [x] (-> (@ ($ FunEqPair #ty) x) (@ ($ FunEqPair #ty) x)) ($ SwapPair #ty)). | SwapCoe(#ty,#r:dim) | =
(coe 1~>#r [x] (-> (@ ($ FunEqPair #ty) x) (@ ($ FunEqPair #ty) x)) ($ SwapPair #ty)). | define | SwapCoe | example | example/invariance.prl | [] | [
"FunEqPair",
"SwapPair"
] | null | 129 | 130 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
SwapFun :
(->
[ty : (U 0 kan)]
(-> bool ty)
(-> bool ty))
by {
lam ty => `(SwapCoe ty 0)
}. | SwapFun :
(->
[ty : (U 0 kan)]
(-> bool ty)
(-> bool ty)) | by {
lam ty => `(SwapCoe ty 0)
}. | theorem | SwapFun | example | example/invariance.prl | [] | [
"SwapCoe"
] | null | 132 | 139 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
ComputeSwap :
(=
bool
($ SwapFun bool (lam [b] b) tt)
ff)
by {
auto
}. | ComputeSwap :
(=
bool
($ SwapFun bool (lam [b] b) tt)
ff) | by {
auto
}. | theorem | ComputeSwap | example | example/invariance.prl | [] | [
"SwapFun"
] | null | 141 | 148 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
SwapPairEqn :
(->
[ty : (U 0 kan)]
[pair : (* ty ty)]
(path [_] (* ty ty) ($ SwapPair ty ($ SwapPair ty pair)) pair))
by {
lam ty pair => abs x => `pair
}. | SwapPairEqn :
(->
[ty : (U 0 kan)]
[pair : (* ty ty)]
(path [_] (* ty ty) ($ SwapPair ty ($ SwapPair ty pair)) pair)) | by {
lam ty pair => abs x => `pair
}. | theorem | SwapPairEqn | example | example/invariance.prl | [] | [
"SwapPair"
] | null | 152 | 159 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
SwapFunEqn :
(->
[ty : (U 0 kan)]
[fun : (-> bool ty)]
(path [_] (-> bool ty) ($ SwapFun ty ($ SwapFun ty fun)) fun))
by {
lam ty =>
`(coe 1~>0
[x] (-> [elt : (@ ($ FunEqPair ty) x)]
(path [_] (@ ($ FunEqPair ty) x)
($ (SwapCoe ty x) ($ (SwapCoe ty x) elt))
... | SwapFunEqn :
(->
[ty : (U 0 kan)]
[fun : (-> bool ty)]
(path [_] (-> bool ty) ($ SwapFun ty ($ SwapFun ty fun)) fun)) | by {
lam ty =>
`(coe 1~>0
[x] (-> [elt : (@ ($ FunEqPair ty) x)]
(path [_] (@ ($ FunEqPair ty) x)
($ (SwapCoe ty x) ($ (SwapCoe ty x) elt))
elt))
($ SwapPairEqn ty));
refine coe/eq;
#2 {
refine subtype/eq; refine fun/eqtype;
#1 {
refine path/eqty... | theorem | SwapFunEqn | example | example/invariance.prl | [] | [
"FunEqPair",
"SwapCoe",
"SwapFun",
"SwapPairEqn"
] | null | 161 | 184 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsContr (#C) = (* [c : #C] (-> [c' : #C] (path [_] #C c' c))). | IsContr (#C) | = (* [c : #C] (-> [c' : #C] (path [_] #C c' c))). | define | IsContr | example | example/isotoequiv.prl | [] | [] | null | 1 | 1 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Fiber (#A,#B,#f,#b) = (* [a : #A] (path [_] #B ($ #f a) #b)). | Fiber (#A,#B,#f,#b) | = (* [a : #A] (path [_] #B ($ #f a) #b)). | define | Fiber | example | example/isotoequiv.prl | [] | [] | null | 3 | 3 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsEquiv (#A,#B,#f) = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | IsEquiv (#A,#B,#f) | = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | define | IsEquiv | example | example/isotoequiv.prl | [] | [
"Fiber",
"IsContr"
] | null | 5 | 5 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Equiv (#A,#B) = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | Equiv (#A,#B) | = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | define | Equiv | example | example/isotoequiv.prl | [] | [
"IsEquiv"
] | null | 7 | 7 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Iso(#A, #B) =
(record
[f : (-> #A #B)]
[g : (-> #B #A)]
[fg : (-> [b : #B] (path [_] #B ($ f ($ g b)) b))]
[gf : (-> [a : #A] (path [_] #A ($ g ($ f a)) a))]). | Iso(#A, #B) | =
(record
[f : (-> #A #B)]
[g : (-> #B #A)]
[fg : (-> [b : #B] (path [_] #B ($ f ($ g b)) b))]
[gf : (-> [a : #A] (path [_] #A ($ g ($ f a)) a))]). | define | Iso | example | example/isotoequiv.prl | [] | [] | null | 9 | 14 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Rem/Sq(#A,#g,#gf,#b,#x,#p,#i:dim,#j:dim) =
(hcom 0~>#j #A ($ #g (@ #p #i))
[#i=0 [k] (@ ($ #gf #x) k)]
[#i=1 [_] ($ #g #b)]). | Rem/Sq(#A,#g,#gf,#b,#x,#p,#i:dim,#j:dim) | =
(hcom 0~>#j #A ($ #g (@ #p #i))
[#i=0 [k] (@ ($ #gf #x) k)]
[#i=1 [_] ($ #g #b)]). | define | Rem/Sq | example | example/isotoequiv.prl | [] | [] | null | 16 | 19 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
P/Sq(#A,#g,#b,#sq0,#sq1,#i:dim,#j:dim) =
(hcom 1~>#j #A ($ #g #b)
[#i=0 [k] (@ #sq0 k 1)]
[#i=1 [k] (@ #sq1 k 1)]). | P/Sq(#A,#g,#b,#sq0,#sq1,#i:dim,#j:dim) | =
(hcom 1~>#j #A ($ #g #b)
[#i=0 [k] (@ #sq0 k 1)]
[#i=1 [k] (@ #sq1 k 1)]). | define | P/Sq | example | example/isotoequiv.prl | [] | [] | null | 21 | 24 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
LemIso(#l:lvl) :
(->
[ty/a : (U #l kan)]
[ty/b : (U #l kan)]
[iso : (Iso ty/a ty/b)]
[b : ty/b]
[f0 f1 : (Fiber ty/a ty/b (!f iso) b)]
(path [_] (Fiber ty/a ty/b (!f iso) b) f0 f1))
by {
lam ty/a ty/b {f=f,g=g,fg=fg,gf=gf} b {x0,p0} {x1,p1} =>
claim sq0 : (path [i] (path [j] ty/a
... | LemIso(#l:lvl) :
(->
[ty/a : (U #l kan)]
[ty/b : (U #l kan)]
[iso : (Iso ty/a ty/b)]
[b : ty/b]
[f0 f1 : (Fiber ty/a ty/b (!f iso) b)]
(path [_] (Fiber ty/a ty/b (!f iso) b) f0 f1)) | by {
lam ty/a ty/b {f=f,g=g,fg=fg,gf=gf} b {x0,p0} {x1,p1} =>
claim sq0 : (path [i] (path [j] ty/a
($ g (@ p0 i))
(Rem/Sq ty/a g gf b x0 p0 i 1))
($ gf x0)
(abs [_] ($ g b))) by {
abs i j => `(Rem/Sq ty/a g gf b ... | theorem | LemIso | example | example/isotoequiv.prl | [] | [
"Fiber",
"Iso",
"P/Sq",
"Rem/Sq"
] | null | 26 | 71 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsoToEquiv(#l:lvl) :
(->
[ty/a : (U #l kan)]
[ty/b : (U #l kan)]
(Iso ty/a ty/b)
(Equiv ty/a ty/b))
by {
lam ty/a ty/b {f=f,g=g,fg=fg,gf=gf} =>
{use f, id};
lam b =>
{{`($ g b), `($ fg b)}, id};
lam fib =>
use (LemIso #l)
[`ty/a,
`ty/b,
`(tuple [f f] [g g] [fg fg] [gf gf]),
... | IsoToEquiv(#l:lvl) :
(->
[ty/a : (U #l kan)]
[ty/b : (U #l kan)]
(Iso ty/a ty/b)
(Equiv ty/a ty/b)) | by {
lam ty/a ty/b {f=f,g=g,fg=fg,gf=gf} =>
{use f, id};
lam b =>
{{`($ g b), `($ fg b)}, id};
lam fib =>
use (LemIso #l)
[`ty/a,
`ty/b,
`(tuple [f f] [g g] [fg fg] [gf gf]),
`b,
`fib,
{`($ g b), `($ fg b)}]
}. | theorem | IsoToEquiv | example | example/isotoequiv.prl | [] | [
"Equiv",
"Iso",
"LemIso"
] | null | 73 | 92 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
J/square(#i:dim,#j:dim, #ty, #a, #p) =
(hcom 0~>#j #ty #a
[#i=0 [_] #a]
[#i=1 [j] (@ #p j)])
. | J/square(#i:dim,#j:dim, #ty, #a, #p) | =
(hcom 0~>#j #ty #a
[#i=0 [_] #a]
[#i=1 [j] (@ #p j)])
. | define | J/square | example | example/J.prl | [] | [] | null | 1 | 5 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
J/coe(#j:dim, #ty, #a, #fam, #d, #p) =
(coe 0~>#j
[i] ($ #fam
(J/square i (dim 1) #ty #a #p)
(abs [j] (J/square i j #ty #a #p)))
#d)
. | J/coe(#j:dim, #ty, #a, #fam, #d, #p) | =
(coe 0~>#j
[i] ($ #fam
(J/square i (dim 1) #ty #a #p)
(abs [j] (J/square i j #ty #a #p)))
#d)
. | define | J/coe | example | example/J.prl | [] | [
"J/square"
] | null | 7 | 13 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
J(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
[fam : (-> [x : ty] (path [_] ty a x) (U #l kan))]
[d : ($ fam a (abs [_] a))]
[x : ty]
[p : (path [_] ty a x)]
($ fam x p))
by {
lam ty a fam d x p => `(J/coe (dim 1) ty a fam d p)
}. | J(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
[fam : (-> [x : ty] (path [_] ty a x) (U #l kan))]
[d : ($ fam a (abs [_] a))]
[x : ty]
[p : (path [_] ty a x)]
($ fam x p)) | by {
lam ty a fam d x p => `(J/coe (dim 1) ty a fam d p)
}. | theorem | J | example | example/J.prl | [] | [
"J/coe"
] | null | 15 | 26 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
J/comp/cube(#i:dim,#j:dim,#k:dim, #ty, #a) =
(hcom 0~>#j #ty #a
[#k=0 [j] (J/square #i j #ty #a (abs [_] #a))]
[#k=1 [_] #a]
[#i=0 [_] #a]
[#i=1 [_] #a])
. | J/comp/cube(#i:dim,#j:dim,#k:dim, #ty, #a) | =
(hcom 0~>#j #ty #a
[#k=0 [j] (J/square #i j #ty #a (abs [_] #a))]
[#k=1 [_] #a]
[#i=0 [_] #a]
[#i=1 [_] #a])
. | define | J/comp/cube | example | example/J.prl | [] | [
"J/square"
] | null | 28 | 34 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
J/comp(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
[fam : (-> [x : ty] (path [_] ty a x) (U #l kan))]
[d : ($ fam a (abs [_] a))]
(path [_] ($ fam a (abs [_] a))
($ (J #l) ty a fam d a (abs [_] a))
d))
by {
lam ty a fam d => abs k =>
`(com 0~>1
[i] ($ fam (J/comp/cube i (dim 1) k ty a)... | J/comp(#l:lvl) :
(->
[ty : (U #l kan)]
[a : ty]
[fam : (-> [x : ty] (path [_] ty a x) (U #l kan))]
[d : ($ fam a (abs [_] a))]
(path [_] ($ fam a (abs [_] a))
($ (J #l) ty a fam d a (abs [_] a))
d)) | by {
lam ty a fam d => abs k =>
`(com 0~>1
[i] ($ fam (J/comp/cube i (dim 1) k ty a)
(abs [j] (J/comp/cube i j k ty a)))
d
[k=0 [i] (J/coe i ty a fam d (abs [_] a))]
[k=1 [_] d])
}. | theorem | J/comp | example | example/J.prl | [] | [
"J/coe",
"J/comp/cube"
] | null | 36 | 53 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Op = (lam [x] x). | Op | = (lam [x] x). | define | Op | example | example/metalanguage.prl | [] | [] | null | 4 | 4 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1' : (U 0 kan)
{ base'
, loop' [x : dim] [x=0 (self base')] [x=1 (self base')]
}
by {
auto
}. | S1' : (U 0 kan)
{ base'
, loop' [x : dim] [x=0 (self base')] [x=1 (self base')]
} | by {
auto
}. | data | S1' | example | example/omega1s1-inductive.prl | [] | [] | null | 1 | 7 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntPred :
(-> int int)
by {
lam a => elim a;
[ with n => elim n;
[ `(int -1)
, with _ n' => `(pos n')
]
, with n => `(negsucc (succ n))
];
}. | IntPred :
(-> int int) | by {
lam a => elim a;
[ with n => elim n;
[ `(int -1)
, with _ n' => `(pos n')
]
, with n => `(negsucc (succ n))
];
}. | theorem | IntPred | example | example/omega1s1-inductive.prl | [] | [] | null | 9 | 19 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSucc :
(-> int int)
by {
lam a => elim a;
[ with n => `(pos (succ n))
, with n => elim n;
[ `(int 0)
, with _ n' => `(negsucc n')
]
]
}. | IntSucc :
(-> int int) | by {
lam a => elim a;
[ with n => `(pos (succ n))
, with n => elim n;
[ `(int 0)
, with _ n' => `(negsucc n')
]
]
}. | theorem | IntSucc | example | example/omega1s1-inductive.prl | [] | [] | null | 21 | 31 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccIntPred :
(-> [i : int] (= int ($ IntSucc ($ IntPred i)) i))
by {
lam i => elim i;
[ with n => elim n; auto
, auto
]
}. | IntSuccIntPred :
(-> [i : int] (= int ($ IntSucc ($ IntPred i)) i)) | by {
lam i => elim i;
[ with n => elim n; auto
, auto
]
}. | theorem | IntSuccIntPred | example | example/omega1s1-inductive.prl | [] | [
"IntPred",
"IntSucc"
] | null | 33 | 40 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntPredIntSucc :
(-> [i : int] (= int ($ IntPred ($ IntSucc i)) i))
by {
lam i => elim i;
[ auto
, with n => elim n; auto
]
}. | IntPredIntSucc :
(-> [i : int] (= int ($ IntPred ($ IntSucc i)) i)) | by {
lam i => elim i;
[ auto
, with n => elim n; auto
]
}. | theorem | IntPredIntSucc | example | example/omega1s1-inductive.prl | [] | [
"IntPred",
"IntSucc"
] | null | 42 | 49 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
HasAllPathsTo (#C,#c) = (-> [c' : #C] (path [_] #C c' #c)). | HasAllPathsTo (#C,#c) | = (-> [c' : #C] (path [_] #C c' #c)). | define | HasAllPathsTo | example | example/omega1s1-inductive.prl | [] | [] | null | 51 | 51 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsContr (#C) = (* [c : #C] (HasAllPathsTo #C c)). | IsContr (#C) | = (* [c : #C] (HasAllPathsTo #C c)). | define | IsContr | example | example/omega1s1-inductive.prl | [] | [
"HasAllPathsTo"
] | null | 53 | 53 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Fiber (#A,#B,#f,#b) = (* [a : #A] (path [_] #B ($ #f a) #b)). | Fiber (#A,#B,#f,#b) | = (* [a : #A] (path [_] #B ($ #f a) #b)). | define | Fiber | example | example/omega1s1-inductive.prl | [] | [] | null | 55 | 55 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsEquiv (#A,#B,#f) = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | IsEquiv (#A,#B,#f) | = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | define | IsEquiv | example | example/omega1s1-inductive.prl | [] | [
"Fiber",
"IsContr"
] | null | 57 | 57 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Equiv (#A,#B) = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | Equiv (#A,#B) | = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | define | Equiv | example | example/omega1s1-inductive.prl | [] | [
"IsEquiv"
] | null | 59 | 59 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccIsEquiv :
(IsEquiv int int IntSucc)
by {
lam i =>
claim eq : (= int ($ IntSucc ($ IntPred i)) i) by {use IntSuccIntPred [`i]};
unfold IntSucc IntPred in eq; reduce at left in eq;
{ {use IntPred [`i], abs _ => `i};
auto; assumption
, lam {i',p'} =>
claim eq0 : (= int i ($ IntSucc... | IntSuccIsEquiv :
(IsEquiv int int IntSucc) | by {
lam i =>
claim eq : (= int ($ IntSucc ($ IntPred i)) i) by {use IntSuccIntPred [`i]};
unfold IntSucc IntPred in eq; reduce at left in eq;
{ {use IntPred [`i], abs _ => `i};
auto; assumption
, lam {i',p'} =>
claim eq0 : (= int i ($ IntSucc i')) by {`(coe 1~>0 [x] (= int i (@ p' x)) a... | theorem | IntSuccIsEquiv | example | example/omega1s1-inductive.prl | [] | [
"IntPred",
"IntPredIntSucc",
"IntSucc",
"IntSuccIntPred",
"IsEquiv"
] | null | 61 | 82 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccEquiv :
(Equiv int int)
by {
{`IntSucc, `IntSuccIsEquiv}
}. | IntSuccEquiv :
(Equiv int int) | by {
{`IntSucc, `IntSuccIsEquiv}
}. | theorem | IntSuccEquiv | example | example/omega1s1-inductive.prl | [] | [
"Equiv",
"IntSucc",
"IntSuccIsEquiv"
] | null | 84 | 88 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccPath :
(path [_] (U 0 kan) int int)
by {
abs x => `(V x int int IntSuccEquiv)
}. | IntSuccPath :
(path [_] (U 0 kan) int int) | by {
abs x => `(V x int int IntSuccEquiv)
}. | theorem | IntSuccPath | example | example/omega1s1-inductive.prl | [] | [
"IntSuccEquiv"
] | null | 90 | 94 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1UnivCover :
(-> (. S1' type) (U 0 kan))
by {
lam x => `(. S1' rec [_] (U 0 kan) x int [x] (@ IntSuccPath x));
}. | S1UnivCover :
(-> (. S1' type) (U 0 kan)) | by {
lam x => `(. S1' rec [_] (U 0 kan) x int [x] (@ IntSuccPath x));
}. | theorem | S1UnivCover | example | example/omega1s1-inductive.prl | [] | [
"IntSuccPath",
"S1'"
] | null | 96 | 100 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Loop :
(path [_] (. S1' type) (. S1' base') (. S1' base'))
by {
abs i => `(. S1' loop' i)
}. | Loop :
(path [_] (. S1' type) (. S1' base') (. S1' base')) | by {
abs i => `(. S1' loop' i)
}. | theorem | Loop | example | example/omega1s1-inductive.prl | [] | [
"S1'"
] | null | 102 | 106 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1LoopToInt :
(-> (path [_] (. S1' type) (. S1' base') (. S1' base')) int)
by {
lam l => `(coe 0~>1 [x] ($ S1UnivCover (@ l x)) (int 0));
claim eq : (= (. S1' type) (@ l 1) (. S1' base')) by {auto};
auto;
[ rewrite eq at type; [with x => `($ S1UnivCover x)]; auto
, rewrite eq at left; [with x => `($... | S1LoopToInt :
(-> (path [_] (. S1' type) (. S1' base') (. S1' base')) int) | by {
lam l => `(coe 0~>1 [x] ($ S1UnivCover (@ l x)) (int 0));
claim eq : (= (. S1' type) (@ l 1) (. S1' base')) by {auto};
auto;
[ rewrite eq at type; [with x => `($ S1UnivCover x)]; auto
, rewrite eq at left; [with x => `($ S1UnivCover x)]; auto
]
}. | theorem | S1LoopToInt | example | example/omega1s1-inductive.prl | [] | [
"S1'",
"S1UnivCover"
] | null | 108 | 117 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1LoopConcat :
(->
(path [_] (. S1' type) (. S1' base') (. S1' base'))
(path [_] (. S1' type) (. S1' base') (. S1' base'))
(path [_] (. S1' type) (. S1' base') (. S1' base')))
by {
lam p q => abs x => `(hcom 0~>1 (. S1' type) (@ p x) [x=0 [_] (. S1' base')] [x=1 [y] (@ q y)])
}. | S1LoopConcat :
(->
(path [_] (. S1' type) (. S1' base') (. S1' base'))
(path [_] (. S1' type) (. S1' base') (. S1' base'))
(path [_] (. S1' type) (. S1' base') (. S1' base'))) | by {
lam p q => abs x => `(hcom 0~>1 (. S1' type) (@ p x) [x=0 [_] (. S1' base')] [x=1 [y] (@ q y)])
}. | theorem | S1LoopConcat | example | example/omega1s1-inductive.prl | [] | [
"S1'"
] | null | 119 | 126 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1LoopInv :
(->
(path [_] (. S1' type) (. S1' base') (. S1' base'))
(path [_] (. S1' type) (. S1' base') (. S1' base')))
by {
lam p => abs x => `(hcom 0~>1 (. S1' type) (. S1' base') [x=0 [y] (@ p y)] [x=1 [_] (. S1' base')])
}. | S1LoopInv :
(->
(path [_] (. S1' type) (. S1' base') (. S1' base'))
(path [_] (. S1' type) (. S1' base') (. S1' base'))) | by {
lam p => abs x => `(hcom 0~>1 (. S1' type) (. S1' base') [x=0 [y] (@ p y)] [x=1 [_] (. S1' base')])
}. | theorem | S1LoopInv | example | example/omega1s1-inductive.prl | [] | [
"S1'"
] | null | 128 | 134 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntToS1Loop :
(-> int (path [_] (. S1' type) (. S1' base') (. S1' base')))
by {
lam i => elim i;
[ with n => elim n;
[ abs _ => `(. S1' base')
, with ih => `($ S1LoopConcat Loop ih)
]
, with n => elim n;
[ `($ S1LoopInv Loop)
, with ih => `($ S1LoopConcat ($ S1LoopInv Loop) ih)
]
]
}. | IntToS1Loop :
(-> int (path [_] (. S1' type) (. S1' base') (. S1' base'))) | by {
lam i => elim i;
[ with n => elim n;
[ abs _ => `(. S1' base')
, with ih => `($ S1LoopConcat Loop ih)
]
, with n => elim n;
[ `($ S1LoopInv Loop)
, with ih => `($ S1LoopConcat ($ S1LoopInv Loop) ih)
]
]
}. | theorem | IntToS1Loop | example | example/omega1s1-inductive.prl | [] | [
"Loop",
"S1'",
"S1LoopConcat",
"S1LoopInv"
] | null | 136 | 149 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Test0 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int 3))) (int 3))
by {
unfold IntToS1Loop Loop; auto
}. | Test0 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int 3))) (int 3)) | by {
unfold IntToS1Loop Loop; auto
}. | theorem | Test0 | example | example/omega1s1-inductive.prl | [] | [
"IntToS1Loop",
"Loop",
"S1LoopToInt"
] | null | 151 | 155 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Test1 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int -3))) (int -3))
by {
unfold IntToS1Loop S1LoopInv Loop; auto
}. | Test1 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int -3))) (int -3)) | by {
unfold IntToS1Loop S1LoopInv Loop; auto
}. | theorem | Test1 | example | example/omega1s1-inductive.prl | [] | [
"IntToS1Loop",
"Loop",
"S1LoopInv",
"S1LoopToInt"
] | null | 157 | 161 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntPred :
(-> int int)
by {
lam a => elim a;
[ with n => elim n;
[ `(int -1)
, with _ n' => `(pos n')
]
, with n => `(negsucc (succ n))
];
}. | IntPred :
(-> int int) | by {
lam a => elim a;
[ with n => elim n;
[ `(int -1)
, with _ n' => `(pos n')
]
, with n => `(negsucc (succ n))
];
}. | theorem | IntPred | example | example/omega1s1.prl | [] | [] | null | 1 | 11 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSucc :
(-> int int)
by {
lam a => elim a;
[ with n => `(pos (succ n))
, with n => elim n;
[ `(int 0)
, with _ n' => `(negsucc n')
]
]
}. | IntSucc :
(-> int int) | by {
lam a => elim a;
[ with n => `(pos (succ n))
, with n => elim n;
[ `(int 0)
, with _ n' => `(negsucc n')
]
]
}. | theorem | IntSucc | example | example/omega1s1.prl | [] | [] | null | 13 | 23 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccIntPred :
(-> [i : int] (= int ($ IntSucc ($ IntPred i)) i))
by {
lam i => elim i;
[ with n => elim n; auto
, auto
]
}. | IntSuccIntPred :
(-> [i : int] (= int ($ IntSucc ($ IntPred i)) i)) | by {
lam i => elim i;
[ with n => elim n; auto
, auto
]
}. | theorem | IntSuccIntPred | example | example/omega1s1.prl | [] | [
"IntPred",
"IntSucc"
] | null | 25 | 32 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntPredIntSucc :
(-> [i : int] (= int ($ IntPred ($ IntSucc i)) i))
by {
lam i => elim i;
[ auto
, with n => elim n; auto
]
}. | IntPredIntSucc :
(-> [i : int] (= int ($ IntPred ($ IntSucc i)) i)) | by {
lam i => elim i;
[ auto
, with n => elim n; auto
]
}. | theorem | IntPredIntSucc | example | example/omega1s1.prl | [] | [
"IntPred",
"IntSucc"
] | null | 34 | 41 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
HasAllPathsTo (#C,#c) = (-> [c' : #C] (path [_] #C c' #c)). | HasAllPathsTo (#C,#c) | = (-> [c' : #C] (path [_] #C c' #c)). | define | HasAllPathsTo | example | example/omega1s1.prl | [] | [] | null | 43 | 43 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsContr (#C) = (* [c : #C] (HasAllPathsTo #C c)). | IsContr (#C) | = (* [c : #C] (HasAllPathsTo #C c)). | define | IsContr | example | example/omega1s1.prl | [] | [
"HasAllPathsTo"
] | null | 45 | 45 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Fiber (#A,#B,#f,#b) = (* [a : #A] (path [_] #B ($ #f a) #b)). | Fiber (#A,#B,#f,#b) | = (* [a : #A] (path [_] #B ($ #f a) #b)). | define | Fiber | example | example/omega1s1.prl | [] | [] | null | 47 | 47 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IsEquiv (#A,#B,#f) = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | IsEquiv (#A,#B,#f) | = (-> [b : #B] (IsContr (Fiber #A #B #f b))). | define | IsEquiv | example | example/omega1s1.prl | [] | [
"Fiber",
"IsContr"
] | null | 49 | 49 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Equiv (#A,#B) = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | Equiv (#A,#B) | = (* [f : (-> #A #B)] (IsEquiv #A #B f)). | define | Equiv | example | example/omega1s1.prl | [] | [
"IsEquiv"
] | null | 51 | 51 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccIsEquiv :
(IsEquiv int int IntSucc)
by {
lam i =>
claim eq : (= int ($ IntSucc ($ IntPred i)) i) by {use IntSuccIntPred [`i]};
unfold IntSucc IntPred in eq; reduce at left in eq;
{ {use IntPred [`i], abs _ => `i};
auto; assumption
, lam {i',p'} =>
claim eq0 : (= int i ($ IntSucc... | IntSuccIsEquiv :
(IsEquiv int int IntSucc) | by {
lam i =>
claim eq : (= int ($ IntSucc ($ IntPred i)) i) by {use IntSuccIntPred [`i]};
unfold IntSucc IntPred in eq; reduce at left in eq;
{ {use IntPred [`i], abs _ => `i};
auto; assumption
, lam {i',p'} =>
claim eq0 : (= int i ($ IntSucc i')) by {`(coe 1~>0 [x] (= int i (@ p' x)) a... | theorem | IntSuccIsEquiv | example | example/omega1s1.prl | [] | [
"IntPred",
"IntPredIntSucc",
"IntSucc",
"IntSuccIntPred",
"IsEquiv"
] | null | 53 | 74 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccEquiv :
(Equiv int int)
by {
{`IntSucc, `IntSuccIsEquiv}
}. | IntSuccEquiv :
(Equiv int int) | by {
{`IntSucc, `IntSuccIsEquiv}
}. | theorem | IntSuccEquiv | example | example/omega1s1.prl | [] | [
"Equiv",
"IntSucc",
"IntSuccIsEquiv"
] | null | 76 | 80 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntSuccPath :
(path [_] (U 0 kan) int int)
by {
abs x => `(V x int int IntSuccEquiv)
}. | IntSuccPath :
(path [_] (U 0 kan) int int) | by {
abs x => `(V x int int IntSuccEquiv)
}. | theorem | IntSuccPath | example | example/omega1s1.prl | [] | [
"IntSuccEquiv"
] | null | 82 | 86 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1UnivCover :
(-> S1 (U 0 kan))
by {
lam x => `(S1-rec [_] (U 0 kan) x int [x] (@ IntSuccPath x));
}. | S1UnivCover :
(-> S1 (U 0 kan)) | by {
lam x => `(S1-rec [_] (U 0 kan) x int [x] (@ IntSuccPath x));
}. | theorem | S1UnivCover | example | example/omega1s1.prl | [] | [
"IntSuccPath"
] | null | 88 | 92 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Loop :
(path [_] S1 base base)
by {
abs i => `(loop i)
}. | Loop :
(path [_] S1 base base) | by {
abs i => `(loop i)
}. | theorem | Loop | example | example/omega1s1.prl | [] | [] | null | 94 | 98 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1LoopToInt :
(-> (path [_] S1 base base) int)
by {
lam l => `(coe 0~>1 [x] ($ S1UnivCover (@ l x)) (int 0));
claim eq : (= S1 (@ l 1) base) by {auto};
auto;
[ rewrite eq at type; [with x => `($ S1UnivCover x)]; auto
, rewrite eq at left; [with x => `($ S1UnivCover x)]; auto
]
}. | S1LoopToInt :
(-> (path [_] S1 base base) int) | by {
lam l => `(coe 0~>1 [x] ($ S1UnivCover (@ l x)) (int 0));
claim eq : (= S1 (@ l 1) base) by {auto};
auto;
[ rewrite eq at type; [with x => `($ S1UnivCover x)]; auto
, rewrite eq at left; [with x => `($ S1UnivCover x)]; auto
]
}. | theorem | S1LoopToInt | example | example/omega1s1.prl | [] | [
"S1UnivCover"
] | null | 100 | 109 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1LoopConcat :
(->
(path [_] S1 base base)
(path [_] S1 base base)
(path [_] S1 base base))
by {
lam p q => abs x => `(hcom 0~>1 S1 (@ p x) [x=0 [_] base] [x=1 [y] (@ q y)])
}. | S1LoopConcat :
(->
(path [_] S1 base base)
(path [_] S1 base base)
(path [_] S1 base base)) | by {
lam p q => abs x => `(hcom 0~>1 S1 (@ p x) [x=0 [_] base] [x=1 [y] (@ q y)])
}. | theorem | S1LoopConcat | example | example/omega1s1.prl | [] | [] | null | 111 | 118 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
S1LoopInv :
(->
(path [_] S1 base base)
(path [_] S1 base base))
by {
lam p => abs x => `(hcom 0~>1 S1 base [x=0 [y] (@ p y)] [x=1 [_] base])
}. | S1LoopInv :
(->
(path [_] S1 base base)
(path [_] S1 base base)) | by {
lam p => abs x => `(hcom 0~>1 S1 base [x=0 [y] (@ p y)] [x=1 [_] base])
}. | theorem | S1LoopInv | example | example/omega1s1.prl | [] | [] | null | 120 | 126 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
IntToS1Loop :
(-> int (path [_] S1 base base))
by {
lam i => elim i;
[ with n => elim n;
[ abs _ => `base
, with ih => `($ S1LoopConcat Loop ih)
]
, with n => elim n;
[ `($ S1LoopInv Loop)
, with ih => `($ S1LoopConcat ($ S1LoopInv Loop) ih)
]
]
}. | IntToS1Loop :
(-> int (path [_] S1 base base)) | by {
lam i => elim i;
[ with n => elim n;
[ abs _ => `base
, with ih => `($ S1LoopConcat Loop ih)
]
, with n => elim n;
[ `($ S1LoopInv Loop)
, with ih => `($ S1LoopConcat ($ S1LoopInv Loop) ih)
]
]
}. | theorem | IntToS1Loop | example | example/omega1s1.prl | [] | [
"Loop",
"S1LoopConcat",
"S1LoopInv"
] | null | 128 | 141 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Test0 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int 3))) (int 3))
by {
unfold IntToS1Loop Loop; auto
}. | Test0 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int 3))) (int 3)) | by {
unfold IntToS1Loop Loop; auto
}. | theorem | Test0 | example | example/omega1s1.prl | [] | [
"IntToS1Loop",
"Loop",
"S1LoopToInt"
] | null | 143 | 147 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Test1 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int -3))) (int -3))
by {
unfold IntToS1Loop S1LoopInv Loop; auto
}. | Test1 :
(= int ($ S1LoopToInt ($ IntToS1Loop (int -3))) (int -3)) | by {
unfold IntToS1Loop S1LoopInv Loop; auto
}. | theorem | Test1 | example | example/omega1s1.prl | [] | [
"IntToS1Loop",
"Loop",
"S1LoopInv",
"S1LoopToInt"
] | null | 149 | 153 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
BoolTest :
(-> bool bool)
by {
// A term/witness can be supplied to the refiner at any point in a tactic script
// using the quotation operator `.
lam x => if x then `tt else `ff
}. | BoolTest :
(-> bool bool) | by {
// A term/witness can be supplied to the refiner at any point in a tactic script
// using the quotation operator `.
lam x => if x then `tt else `ff
}. | theorem | BoolTest | example | example/README.prl | [] | [] | null | 1 | 7 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
PathTest :
(path [_] S1 base base)
by {
abs x => `(loop x)
}. | PathTest :
(path [_] S1 base base) | by {
abs x => `(loop x)
}. | theorem | PathTest | example | example/README.prl | [] | [] | null | 10 | 14 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
LowLevel :
(->
(-> bool bool)
bool)
by {
refine fun/intro;
[ with f =>
elim f; [`tt, with x/eq x => use x]
, refine fun/eqtype;
refine bool/eqtype
]
}. | LowLevel :
(->
(-> bool bool)
bool) | by {
refine fun/intro;
[ with f =>
elim f; [`tt, with x/eq x => use x]
, refine fun/eqtype;
refine bool/eqtype
]
}. | theorem | LowLevel | example | example/README.prl | [] | [] | null | 16 | 27 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
LowLevel2 :
(->
(-> bool bool)
bool
bool)
by {
repeat {refine fun/intro; [id, auto]};
with x f =>
elim f;
[ use x
, with y/eq y => use y
]
}. | LowLevel2 :
(->
(-> bool bool)
bool
bool) | by {
repeat {refine fun/intro; [id, auto]};
with x f =>
elim f;
[ use x
, with y/eq y => use y
]
}. | theorem | LowLevel2 | example | example/README.prl | [] | [] | null | 31 | 43 | true | https://github.com/RedPRL/sml-redprl | c72190de76f7ed1cfbe1d2046c96e99ac5022b0c |
Declarations from RedPRL, a cubical/computational type theory system.
c72190de76f7ed1cfbe1d2046c96e99ac5022b0c| Column | Type | Description |
|---|---|---|
| fact | string | Verbatim declaration with the leading keyword removed: signature and body/proof joined |
| statement | string | Signature with the leading keyword removed (verbatim slice) |
| proof | string | Verbatim proof/body, empty if none |
| type | string | Declaration keyword |
| symbolic_name | string | Declaration identifier |
| library | string | Sub-library |
| filename | string | Repository-relative source path |
| imports | list[string] | Unused (RedPRL has no import statements); always empty |
| deps | list[string] | Intra-corpus identifiers referenced |
| docstring | string | Preceding documentation comment, null if absent |
| line_start | int | First source line |
| line_end | int | Last source line |
| has_proof | bool | Whether a proof block was captured |
| source_url | string | Upstream repository |
| commit | string | Upstream commit extracted |
| Type | Count |
|---|---|
| theorem | 263 |
| define | 69 |
| tactic | 11 |
| data | 5 |
Test(#l:lvl) : (Category (++#l)) by {
{ ob = `(U #l)
, hom = lam ty/a ty/b => `(-> ty/a ty/b)
, idn = lam ty/a x => `x
, cmp = lam ty/a ty/b ty/a f g x => use f [use g [`x]]
, idn/l = lam _ _ _ => auto
, idn/r = lam _ _ _ => auto
, assoc = lam _ _ _ _ _ _ _ => auto
}
}.
Test | example/category.prl:33Statement and proof are available both joined (fact) and split (statement, proof) for
proof-term modeling, autoformalization, retrieval, and dependency analysis via deps.
@misc{redprl_dataset,
title = {RedPRL},
author = {Norton, Charles},
year = {2026},
note = {Extracted from https://github.com/RedPRL/sml-redprl, commit c72190de76f7},
url = {https://huggingface.co/datasets/phanerozoic/RedPRL}
}