�
��g � � � d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z d dl
mZmZ d dl
mZ d dlmZ d d lmZ d d
lmZmZ d dlmZ d dlmZmZmZ d d
lmZ d dlmZ d dl m!Z!m"Z" d dl#m$Z$m%Z% d dl&m'Z' d dl(m)Z)m*Z*m+Z+ G d� de� � Z, G d� de,e�� � Z- G d� de,� � Z. G d� de.� � Z/ G d� de.� � Z0 G d� de,� � Z1d(d!�Z2 G d"� d#e,� � Z3 G d$� d%e3� � Z4 G d&� d'e3� � Z5d S ))� )�Basic)�cacheit)�Tuple)�call_highest_priority)�global_parameters)�AppliedUndef�expand��Mul)�Integer)�Eq)�S� Singleton)�ordered)�Dummy�Symbol�Wild��sympify)�Matrix)�lcm�factor)�Interval�Intersection)�Idx)�flatten�is_sequence�iterablec � � e Zd ZdZdZdZed� � � Zd� Ze d� � � Z
e d� � � Ze d� � � Ze d � � � Z
e d
� � � Ze d� � � Ze d� � � Zed
� � � Zd� Zd� Zd� Zd� Zd� Zd� Z ed� � d� � � Zd� Z ed� � d� � � Zd� Zd� Z ed� � d� � � Zd� Z d� Z!d!d �Z"dS )"�SeqBasezBase class for sequencesT� c �P � | j }n# t $ r t j }Y nw xY w|S )z[Return start (if possible) else S.Infinity.
adapted from Set._infimum_key
)�start�NotImplementedErrorr �Infinity)�exprr# s �f/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sympy/series/sequences.py�
_start_keyzSeqBase._start_key s; � � ��J�E�E��"� � � ��J�E�E�E� �����s �
�#�#c �R � t | j |j � � }|j |j fS )zTReturns start and stop.
Takes intersection over the two intervals.
)r �interval�inf�sup)�self�otherr* s r'