Metamath Proof Explorer


Theorem reps

Description: Construct a function mapping a half-open range of nonnegative integers to a constant. (Contributed by AV, 4-Nov-2018)

Ref Expression
Assertion reps S V N 0 S repeatS N = x 0 ..^ N S

Proof

Step Hyp Ref Expression
1 elex S V S V
2 1 adantr S V N 0 S V
3 simpr S V N 0 N 0
4 ovex 0 ..^ N V
5 mptexg 0 ..^ N V x 0 ..^ N S V
6 4 5 mp1i S V N 0 x 0 ..^ N S V
7 oveq2 n = N 0 ..^ n = 0 ..^ N
8 7 adantl s = S n = N 0 ..^ n = 0 ..^ N
9 simpll s = S n = N x 0 ..^ n s = S
10 8 9 mpteq12dva s = S n = N x 0 ..^ n s = x 0 ..^ N S
11 df-reps repeatS = s V , n 0 x 0 ..^ n s
12 10 11 ovmpoga S V N 0 x 0 ..^ N S V S repeatS N = x 0 ..^ N S
13 2 3 6 12 syl3anc S V N 0 S repeatS N = x 0 ..^ N S