1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#![feature(prelude_import)]
#![recursion_limit = "1024"]
#![allow(unused)]
#[prelude_import]
use std::prelude::rust_2024::*;
#[macro_use]
extern crate std;
use tcrts::all::*;
type _0 = Zero;
type _1 = Next<_0>;
type _2 = Next<_1>;
type _3 = Next<_2>;
type _4 = Next<_3>;
type _5 = Next<_4>;
type _6 = Next<_5>;
type _7 = Next<_6>;
type _8 = Next<_7>;
type _9 = Next<_8>;
struct GreaterThanFive;
impl<N> TypeFn<N> for GreaterThanFive
where
N: Num + PeanoLt<_5> + PeanoEq<_5>,
<N as PeanoLt<_5>>::Output: Or<<N as PeanoEq<_5>>::Output>,
<<N as PeanoLt<_5>>::Output as Or<<N as PeanoEq<_5>>::Output>>::Output: Not,
{
type Output = <N as tcrts::cmp::PeanoGt<_5>>::Output;
}
struct Square;
impl<N: Num + PeanoMul<N>> TypeFn<N> for Square {
type Output = <N as PeanoMul<N>>::Output;
}
fn main() {
type N = Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Next<
Zero
>
>
>
>
>
>
>
>
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
>;
}