Skip to content

Commit d068564

Browse files
committed
Added fun::id::eq_comp_right_inv_id
1 parent 9c1547f commit d068564

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/fun/id.rs

+8
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,11 @@ pub fn eq_comp_left_inv_id<F: Prop, A: Prop, B: Prop>(
181181
(Rc::new(move |x| comp_left_inv_to_id(ty_f.clone(), x)),
182182
Rc::new(move |x| id_to_comp_left_inv(ty_f2.clone(), x)))
183183
}
184+
/// `(f : a -> b) => (f . inv(f)) == id{b}`.
185+
pub fn eq_comp_right_inv_id<F: Prop, A: Prop, B: Prop>(
186+
ty_f: Ty<F, Pow<B, A>>
187+
) -> Eq<Comp<F, Inv<F>>, Id<B>> {
188+
let ty_f2 = ty_f.clone();
189+
(Rc::new(move |x| comp_right_inv_to_id(ty_f.clone(), x)),
190+
Rc::new(move |x| id_to_comp_right_inv(ty_f2.clone(), x)))
191+
}

0 commit comments

Comments
 (0)