()
| 172 | /// peano1 : ∀ (t : PN → Prop) (v : (n : PN) → t n), t PN.lit2 := fun t v => v PN.lit2 |
| 173 | #[test] |
| 174 | fn good_peano1() { |
| 175 | let env = peano_env(); |
| 176 | let ty = npi( |
| 177 | "t", |
| 178 | pi(cnst("PN", &[]), sort0()), |
| 179 | npi( |
| 180 | "v", |
| 181 | npi("n", cnst("PN", &[]), app(var(1), var(0))), |
| 182 | app(var(1), cnst("PN.lit2", &[])), |
| 183 | ), |
| 184 | ); |
| 185 | let val = nlam( |
| 186 | "t", |
| 187 | pi(cnst("PN", &[]), sort0()), |
| 188 | nlam( |
| 189 | "v", |
| 190 | npi("n", cnst("PN", &[]), app(var(1), var(0))), |
| 191 | app(var(0), cnst("PN.lit2", &[])), |
| 192 | ), |
| 193 | ); |
| 194 | let mut env2 = env; |
| 195 | let (id, c) = mk_thm("peano1", 0, vec![], ty, val); |
| 196 | env2.insert(id.clone(), c); |
| 197 | check_accepts(&mut env2, &id); |
| 198 | } |
| 199 | |
| 200 | /// peano2 : ∀ (t : PN → Prop) (v : (n : PN) → t n), t PN.lit2 := fun t v => v (PN.add PN.lit1 PN.lit1) |
| 201 | /// Tests that 1 + 1 reduces to 2 via Church numeral reduction. |
nothing calls this directly
no test coverage detected