Skip to content

Combinatorial explosion #259

@guillaumebrunerie

Description

@guillaumebrunerie

This is today’s example of combinatorial explosion (the same issue is present in cubicaltt), which might be why we didn’t manage to compute pi_4(S^3) yet.

Each test has twice as many comp’s as the previous one, but takes about 10 times longer to type check.

For instance test7 is basically the composition of 127 copies of the identity function, so it shouldn’t take as long as 102 second to apply it.

Defined test3 (0.025483s).
Defined test4 (0.156837s).
Defined test5 (1.337610s).
Defined test6 (12.062524s).
Defined test7 (102.599208s).
import path
import unit

let A : type
 = unit

let a : A
 = triv

let testpath : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ λ _ → A | i=1 ⇒ λ _ → A ]

let testpath2 : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ testpath | i=1 ⇒ testpath ]

let testpath3 : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ testpath2 | i=1 ⇒ testpath2 ]

let testpath4 : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ testpath3 | i=1 ⇒ testpath3 ]

let testpath5 : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ testpath4 | i=1 ⇒ testpath4 ]

let testpath6 : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ testpath5 | i=1 ⇒ testpath5 ]

let testpath7 : Path^1 type A A
 = λ i → comp 0 1 A [ i=0 ⇒ testpath6 | i=1 ⇒ testpath6 ]

let test3 : A
 = coe 0 1 a in λ i → testpath3 i

let test4 : A
 = coe 0 1 a in λ i → testpath4 i

let test5 : A
 = coe 0 1 a in λ i → testpath5 i

let test6 : A
 = coe 0 1 a in λ i → testpath6 i

let test7 : A
 = coe 0 1 a in λ i → testpath7 i

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions