postulate 𝕀 : Set i₁ : 𝕀and intuitively the interval has a single directed feature that we call a "transition" somewhere away from $i_1$. I'm drawing it in the diagram as a tick mark with directed arrows. The type $\I$ has no other closed points. We think of time as having an end, but no beginning.
Now the type $X$ (over $\I$) is supposed to capture structure of $f$ as a directed type. Over the pre-transition part of $\I$, it looks like $A$, and over the post-transition part of $\I$, it looks like $B$.
record func : Set₁ where constructor cfunc field A B : Set f : A → B funcOfFibered : (X : Set) (p : X → 𝕀) → func funcOfFibered X p = record { A = Σ[ g : 𝕀 → X ] p ∘ g ≡ id , … }Then $B$ is simply the set of points of $X$ lying in the fiber of $p$ over $i_1$.
funcOfFibered : (X : Set) (p : X → 𝕀) → func funcOfFibered X p = record { A = Σ[ g : 𝕀 → X ] p ∘ g ≡ id , B = Σ[ y : X ] p y ≡ i₁ , … }Finally, the function $f : A → B$ can be computed as the evaluation at $i_1$. Given a $g$ such that $pg = \rid$, we can compute $g(i_1)$, and observe that this is in the fiber of $p$ over $i_1$, because $p(g(i_1)) = (p \o g) (i_1) = \rid(i_1) = i_1$.
Subsequently we can arrive at the projection $p$ by using the pushout UMP. The composite of the constant-$i_1$ map $i_1 : B\to \I$ with $f : A \to B$ gives us the constantly-$i_1$ map $i_1 \o f : A \to \I$, and the map $\pi_2 \langle id, i_1 \rangle$ is also constantly-$i_1$. So we get a unique map $p : X \to \I$ making the diagram commute.
funcOfFibered : (Σ[ X : Set ] X → 𝕀) → (Σ[ A : Set ] Σ[ B : Set ] A → B) fiberedOfFunc : (Σ[ A : Set ] Σ[ B : Set ] A → B) → (Σ[ X : Set ] X → 𝕀)but I tried for a little bit and I failed to prove that either composite of them is the identity. The next best move I assume would be to take one and postulate it is an equivalence. But is one or the other more useful to take as a primitive equivalence? Not sure what the consequences are.
I would also hope that a map $X \to \I \x \I$ would correspond to a commutative square, but tentative thinking in that direction suggests that might not easily follow from any of the proposed postulates above either.