A type family is a set of related types selected by an index. For example, a vehicle’s power source selects whether its type is Vehicle Pedal or Vehicle Petrol. section 4.2.1
data PowerSource = Petrol | Pedal #1 data Vehicle : PowerSource -> Type where #2 Bicycle : Vehicle Pedal #3 Car : (fuel : Nat) -> Vehicle Petrol #4 Bus : (fuel : Nat) -> Vehicle Petrol #4
The constructors show how the power-source index distinguishes bicycles from cars and buses. section 4.2.1
Vect is another family: its index records length, while its element type is a parameter. This lets function types express requirements such as equal input lengths for zip. section 4.2.2
Appending vectors
The type append : Vect n elem -> Vect m elem -> Vect (n + m) elem states that the result length is the sum of the input lengths. Case splitting on the first vector gives a definition that preserves this guarantee. section 4.2.2

