Metamath Proof Explorer


Theorem fzto1stfv1

Description: Value of our permutation P at 1. (Contributed by Thierry Arnoux, 23-Aug-2020)

Ref Expression
Hypotheses psgnfzto1st.d 𝐷 = ( 1 ... 𝑁 )
psgnfzto1st.p 𝑃 = ( 𝑖𝐷 ↦ if ( 𝑖 = 1 , 𝐼 , if ( 𝑖𝐼 , ( 𝑖 − 1 ) , 𝑖 ) ) )
Assertion fzto1stfv1 ( 𝐼𝐷 → ( 𝑃 ‘ 1 ) = 𝐼 )

Proof

Step Hyp Ref Expression
1 psgnfzto1st.d 𝐷 = ( 1 ... 𝑁 )
2 psgnfzto1st.p 𝑃 = ( 𝑖𝐷 ↦ if ( 𝑖 = 1 , 𝐼 , if ( 𝑖𝐼 , ( 𝑖 − 1 ) , 𝑖 ) ) )
3 iftrue ( 𝑖 = 1 → if ( 𝑖 = 1 , 𝐼 , if ( 𝑖𝐼 , ( 𝑖 − 1 ) , 𝑖 ) ) = 𝐼 )
4 elfzuz2 ( 𝐼 ∈ ( 1 ... 𝑁 ) → 𝑁 ∈ ( ℤ ‘ 1 ) )
5 4 1 eleq2s ( 𝐼𝐷𝑁 ∈ ( ℤ ‘ 1 ) )
6 eluzfz1 ( 𝑁 ∈ ( ℤ ‘ 1 ) → 1 ∈ ( 1 ... 𝑁 ) )
7 6 1 eleqtrrdi ( 𝑁 ∈ ( ℤ ‘ 1 ) → 1 ∈ 𝐷 )
8 5 7 syl ( 𝐼𝐷 → 1 ∈ 𝐷 )
9 id ( 𝐼𝐷𝐼𝐷 )
10 2 3 8 9 fvmptd3 ( 𝐼𝐷 → ( 𝑃 ‘ 1 ) = 𝐼 )