Metamath Proof Explorer


Theorem flnn0ohalf

Description: The floor of the half of an odd positive integer is equal to the floor of the half of the integer decreased by 1. (Contributed by AV, 5-Jun-2012)

Ref Expression
Assertion flnn0ohalf ( ( 𝑁 ∈ ℕ0 ∧ ( ( 𝑁 + 1 ) / 2 ) ∈ ℕ0 ) → ( ⌊ ‘ ( 𝑁 / 2 ) ) = ( ⌊ ‘ ( ( 𝑁 − 1 ) / 2 ) ) )

Proof

Step Hyp Ref Expression
1 nn0ofldiv2 ( ( 𝑁 ∈ ℕ0 ∧ ( ( 𝑁 + 1 ) / 2 ) ∈ ℕ0 ) → ( ⌊ ‘ ( 𝑁 / 2 ) ) = ( ( 𝑁 − 1 ) / 2 ) )
2 nn0o ( ( 𝑁 ∈ ℕ0 ∧ ( ( 𝑁 + 1 ) / 2 ) ∈ ℕ0 ) → ( ( 𝑁 − 1 ) / 2 ) ∈ ℕ0 )
3 2 nn0zd ( ( 𝑁 ∈ ℕ0 ∧ ( ( 𝑁 + 1 ) / 2 ) ∈ ℕ0 ) → ( ( 𝑁 − 1 ) / 2 ) ∈ ℤ )
4 flid ( ( ( 𝑁 − 1 ) / 2 ) ∈ ℤ → ( ⌊ ‘ ( ( 𝑁 − 1 ) / 2 ) ) = ( ( 𝑁 − 1 ) / 2 ) )
5 3 4 syl ( ( 𝑁 ∈ ℕ0 ∧ ( ( 𝑁 + 1 ) / 2 ) ∈ ℕ0 ) → ( ⌊ ‘ ( ( 𝑁 − 1 ) / 2 ) ) = ( ( 𝑁 − 1 ) / 2 ) )
6 1 5 eqtr4d ( ( 𝑁 ∈ ℕ0 ∧ ( ( 𝑁 + 1 ) / 2 ) ∈ ℕ0 ) → ( ⌊ ‘ ( 𝑁 / 2 ) ) = ( ⌊ ‘ ( ( 𝑁 − 1 ) / 2 ) ) )