(a) If a lessor fails to deliver the goods in conformity with the lease contract (AS 45.12.509) or repudiates the lease contract (AS 45.12.402), or a lessee rightfully rejects the goods (AS 45.12.509) or justifiably revokes acceptance of the goods under AS 45.12.517, then with respect to the goods involved, and with respect to all of the goods if under an installment lease contract, the value of the whole lease contract is substantially impaired (AS 45.12.510), the lessor is in default under the lease contract and the lessee may
(1) cancel the lease contract under AS 45.12.505(a);
(2) recover as much of the rent and security as has been paid and as is just under the circumstances;
(3) cover and recover damages under AS 45.12.518 and 45.12.520 as to all goods affected whether or not they have been identified to the lease contract, or recover damages for nondelivery under AS 45.12.519 and 45.12.520;
(4) exercise other rights or pursue other remedies provided in the lease contract.
(b) If a lessor fails to deliver the goods in conformity to the lease contract or repudiates the lease contract, the lessee may also
(1) if the goods have been identified, recover them under AS 45.12.522; or
(2) in a proper case, obtain specific performance or replevy the goods under AS 45.12.521.
(c) If a lessor is otherwise in default under a lease contract, the lessee may exercise the rights and pursue the remedies provided in the lease contract, which may include a right to cancel the lease, and AS 45.12.519(c).
(d) If a lessor has breached a warranty, whether express or implied, the lessee may recover damages under AS 45.12.519(d).
(e) On rightful rejection or justifiable revocation of acceptance, a lessee has a security interest in goods in the lessee's possession or control for any rent and security that has been paid and any expenses reasonably incurred in their inspection, receipt, transportation, and care and custody, and may hold those goods and dispose of them in good faith and in a commercially reasonable manner, subject to AS 45.12.527(e).
(f) Subject to AS 45.12.407, a lessee, on notifying the lessor of the lessee's intention to do so, may deduct all or part of the damages resulting from a default under the lease contract from a part of the rent still due under the same lease contract.