Metamath Proof Explorer


Theorem midf

Description: Midpoint as a function. (Contributed by Thierry Arnoux, 1-Dec-2019)

Ref Expression
Hypotheses ismid.p P = Base G
ismid.d - ˙ = dist G
ismid.i I = Itv G
ismid.g φ G 𝒢 Tarski
ismid.1 φ G Dim 𝒢 2
Assertion midf φ mid 𝒢 G : P × P P

Proof

Step Hyp Ref Expression
1 ismid.p P = Base G
2 ismid.d - ˙ = dist G
3 ismid.i I = Itv G
4 ismid.g φ G 𝒢 Tarski
5 ismid.1 φ G Dim 𝒢 2
6 eqid Line 𝒢 G = Line 𝒢 G
7 4 adantr φ a P b P G 𝒢 Tarski
8 eqid pInv 𝒢 G = pInv 𝒢 G
9 simprl φ a P b P a P
10 simprr φ a P b P b P
11 5 adantr φ a P b P G Dim 𝒢 2
12 1 2 3 6 7 8 9 10 11 mideu φ a P b P ∃! m P b = pInv 𝒢 G m a
13 12 ralrimivva φ a P b P ∃! m P b = pInv 𝒢 G m a
14 riotacl ∃! m P b = pInv 𝒢 G m a ι m P | b = pInv 𝒢 G m a P
15 14 2ralimi a P b P ∃! m P b = pInv 𝒢 G m a a P b P ι m P | b = pInv 𝒢 G m a P
16 13 15 syl φ a P b P ι m P | b = pInv 𝒢 G m a P
17 eqid a P , b P ι m P | b = pInv 𝒢 G m a = a P , b P ι m P | b = pInv 𝒢 G m a
18 17 fmpo a P b P ι m P | b = pInv 𝒢 G m a P a P , b P ι m P | b = pInv 𝒢 G m a : P × P P
19 16 18 sylib φ a P , b P ι m P | b = pInv 𝒢 G m a : P × P P
20 df-mid mid 𝒢 = g V a Base g , b Base g ι m Base g | b = pInv 𝒢 g m a
21 fveq2 g = G Base g = Base G
22 21 1 eqtr4di g = G Base g = P
23 fveq2 g = G pInv 𝒢 g = pInv 𝒢 G
24 23 fveq1d g = G pInv 𝒢 g m = pInv 𝒢 G m
25 24 fveq1d g = G pInv 𝒢 g m a = pInv 𝒢 G m a
26 25 eqeq2d g = G b = pInv 𝒢 g m a b = pInv 𝒢 G m a
27 22 26 riotaeqbidv g = G ι m Base g | b = pInv 𝒢 g m a = ι m P | b = pInv 𝒢 G m a
28 22 22 27 mpoeq123dv g = G a Base g , b Base g ι m Base g | b = pInv 𝒢 g m a = a P , b P ι m P | b = pInv 𝒢 G m a
29 4 elexd φ G V
30 1 fvexi P V
31 30 30 mpoex a P , b P ι m P | b = pInv 𝒢 G m a V
32 31 a1i φ a P , b P ι m P | b = pInv 𝒢 G m a V
33 20 28 29 32 fvmptd3 φ mid 𝒢 G = a P , b P ι m P | b = pInv 𝒢 G m a
34 33 feq1d φ mid 𝒢 G : P × P P a P , b P ι m P | b = pInv 𝒢 G m a : P × P P
35 19 34 mpbird φ mid 𝒢 G : P × P P