-
Notifications
You must be signed in to change notification settings - Fork 0
/
If_ff_is_biyective_then_f_is_biyective.thy
61 lines (55 loc) · 1.34 KB
/
If_ff_is_biyective_then_f_is_biyective.thy
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
(* If_ff_is_biyective_then_f_is_biyective.thy
-- If f \<circ> f is bijective, then f is bijective.
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Seville, October 4, 2024
-- ------------------------------------------------------------------ *)
(* ---------------------------------------------------------------------
-- Prove that if f \<sqdot> f is bijective, then f is bijective.
-- ------------------------------------------------------------------ *)
theory If_ff_is_biyective_then_f_is_biyective
imports Main
begin
(* Proof 1 *)
lemma
assumes "bij (f \<circ> f)"
shows "bij f"
proof (rule bijI)
show "inj f"
proof -
have h1 : "inj (f \<circ> f)"
using assms by (simp only: bij_is_inj)
then show "inj f"
by (simp only: inj_on_imageI2)
qed
next
show "surj f"
proof -
have h2 : "surj (f \<circ> f)"
using assms by (simp only: bij_is_surj)
then show "surj f"
by auto
qed
qed
(* Proof 2 *)
lemma
assumes "bij (f \<circ> f)"
shows "bij f"
proof (rule bijI)
show "inj f"
using assms bij_is_inj inj_on_imageI2
by blast
next
show "surj f"
using assms bij_is_surj
by fastforce
qed
(* Proof 3 *)
lemma
assumes "bij (f \<circ> f)"
shows "bij f"
by (metis assms
bij_betw_comp_iff
bij_betw_def
bij_betw_imp_surj
inj_on_imageI2)
end