1. Introduction
Fractional differential equations have a deep physical background (see [
1,
2,
3,
4]), which are more accurate in describing many natural phenomena as compared to integer ones. Many scholars have been devoted to the study of nonlocal Hilfer fractional differential equations (see [
5,
6,
7,
8,
9,
10,
11,
12,
13]). Fractional q-calculus theory is an important branch of discrete mathematics. With the increasing popularity and development of information technology, q-differential is increasingly applied to natural science and engineering, especially in mathematical physical models, dynamical systems, quantum physics and economics, the literatures [
14,
15,
16,
17] were first detailed the definition and introduction of the q-calculus.
With the attention of many experts and scholars on fractional q-difference, rich results have been achieved on fractional q-difference equations via q-Gronwall equality (see [
18]), the existence and stability of the solutions for Riemann–Liouville fractional q-difference equations (see [
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33]), Caputo fractional q-difference initial boundary value problems (see [
34,
35,
36,
37,
38,
39]). In [
40], Boutiara explored the mixed multi-term fractional q-difference equations with q-integral boundary conditions by using topological degree theory. However, there are few studies on the problem of Hilfer fractional q-difference equations. In [
41], Ahmed et al. introduced the definition of Hilfer fractional q-derivative, and discussed the uniqueness of solution for Hilfer fractional hybrid q-integro-difference equation of variable order:
      where 
, 
, 
.
Based on the above discussion, the main objective of the paper is to study the nonlocal initial value problem and Ulam stability for Hilfer fractional q-difference equation as follows.
      
      where 
 denotes the Hilfer fractional q-derivative of order 
 and type 
 with lower limit 
a, 
 is the Riemann–Liouville fractional q-integral as presented in 
Section 2. 
, 
, 
, 
, the given function 
, and 
 are fixed points satisfying 
. The operators 
H and 
G are give by
      
, 
. In this work, different from the previous results, we mainly studied the existence and uniqueness of solution in a weighted space of continuous functions for the nonlocal problem (
1). Moreover, we give the sufficient conditions to discuss the existence of extremal solution in an ordered Banach space, and the solution of nonlocal problem (
1) is Ulam–Hyers stable under some certain conditions.
The remaining structure of paper is organized as follows. In 
Section 2, we introduce some notations and recall some definitions and lemmas. Subsequently, we obtain the existence and uniqueness results of solutions to nonlocal problem (
1) in 
Section 3. Moreover, in 
Section 4, we discuss the existence of extremal solutions of nonlocal problem (
1) in an ordered Banach space. In 
Section 5, we also consider the Ulam–Hyers stability and Ulam–Hyers–Rassias stability results for nonlocal problem (
1). Two examples are given to illustrate theory results in 
Section 6. Finally, some conclusions are given.
  2. Preliminaries
In the section, we will give some notations, definitions and lemmas for fractional q-calculus.
Let , ,  be the Banach space of all continuous functions from  to R with the norm .  denotes the space of n times continuously differentiable functions on ,  represents the class of all bounded mapping in .
For , we have , , , .
We consider the weighted space of continuous functions:
      and
      
      with the norms
      
Moreover,
      
      these spaces satisfy the following properties:
Let  is bounded convex and closed subset of .
Definition 1  ([
14]). 
For , let . The q-analogue of the power  is,  be the set of complex numbers).
 Definition 2  ([
14,
17]). 
For , the q-Gamma function is defined asNotice that the q-Gamma function satisfies  Definition 3  ([
14]). 
For any , , the q-Beta function is defined byin particular . Let a typical q-geometry set be the time scale set defined by , where , .
Definition 4  ([
14]). 
For , the q-integral of u is defined as:for , . Definition 5  ([
14]). 
The q-derivative of function  is defined as:the higher order q-derivatives  is defined by , . In particular , if f is continuous at 0, then 
Definition 6  ([
17]). 
Let , then Riemann–Liouville fractional q-integral of order  is defined asin particular  Definition 7  ([
17]). 
Let ,  is a minimum integer greater than or equal to the α, then the Riemann–Liouville fractional q-derivative of order α of function u is defined by , and Definition 8  ([
16]). 
The Caputo fractional q-derivative of order  of function  is defined as , and Definition 9  ([
41]). 
The Hilfer fractional q-derivative of order  and  with lower limit a of function  is defined bywhere  Remark 1  ([
41]). 
The Hilfer fractional q-derivative can be viewed as a generalization of the Riemann–Liouville and Caputo q-derivative:- (i) 
 The operator  also can be rewritten as - (ii) 
 Let , the Riemann–Liouville fractional q-derivative can be presented as .
- (iii) 
 Let , the Caputo fractional q-derivative can be presented as .
 Lemma 1  ([
17]). 
Let . If  and , then Lemma 2  ([
17]). 
Let , If , then Lemma 3.  Let  and  existed, then  Proof.  By the literature [
17], we have 
, which obtains
        
□
 Lemma 4  ([
34,
38]). 
Suppose ,  is a nonnegative function locally integrable on (some ) and  is a nonnegative, nondecreasing continuous function defined on , (constant), and suppose  is nonnegative and locally integrable on  with , then . Next, we introduce some propositions and definitions about the Kuratowski non-compactness measure 
 in [
42,
43].
 U can be covered by finitely many sets with diameter .
Proposition 1  ([
42,
43]). 
The Kuratowski measure of non-compactness ssatisfies some proposition:- (i) 
 ,
- (ii) 
  if and only if U is relatively compact,
- (iii) 
 , where  and  represent the closure and the convex hull of U, respectively,
- (iv) 
 ,
- (v) 
 .
 Definition 10  ([
42,
43]). 
Let  be a bounded continuous map and . The operator  is ϖ-Lipschitz if there exists constant  such that . Moreover,  is called a strict ϖ-contraction if . Definition 11  ([
42,
43]). 
For bounded and non-precompact subset V of U, the mapping  is said to be ϖ-condensing if . That is,  implies . Proposition 2  ([
44]). 
(i) If  are ϖ-Lipschitz with constants  and  respectively, then  is ϖ-Lipschitz with constant .(ii) If  is compact, then  is ϖ-Lipschitz with .
(iii) If  is Lipschitz with constant l, then  is ϖ-Lipschitz with constant l.
 Lemma 5  ((Topological degree theory) [
44]). 
Let  be ϖ-condensing andIf Ω 
is a bounded set in X, then there exists  such that , and the degree Consequently,  has at least one fixed point and the set of the fixed points of  lies in .
   3. Existence and Uniqueness of Solution
In the section, we obtain the equivalent Volterra integral equation corresponding to the nonlocal problem (1), and further obtain the existence results of solution. Throughout the article, we let .
Now, we introduce some hypotheses as follows.
 satisfies 
 for any 
. For each 
, there exists constant 
 such that
      
 For 
, 
 are continuous functions, and there exist constants 
, such that
      
Lemma 6.  Let  for any .  is a solution of the nonlocal initial value problem (1) is equivalent to u satisfies the following Volterra integral equationwhere .  Proof.  Referring to [
41], We obtain the following procedure.
Since 
 and 
, then 
, by Lemma 1
        
By 
, and Lemma 2 we have
        
        by (
3) and (
4) we obtain
        
Substituting 
 into (
5), we have
        
Thus, we have
        
        then it implies
        
        where 
.
Submitting (
6) to (
5), we obtain
        
□
 By Lemma 2, we consider the following operators 
:
      then the right side of integral Equation (
2) can be written as the operator
      
Obviously, by the continuity of f, operator F is well defined.
Let 
Lemma 7.  Under the assumptions –, A is continuous in the weighted space , and satisfies the inequality as belowwhere   Proof.  We choose a bounded subset , and consider a sequence  such that , we need to prove that .
By the continuity of 
 and 
, it follows that 
, as 
, also
        
        which implies that the left term is bounded and integrable, by the Lebesgue dominated convergent theorem, we obtain
        
        so we have 
 as 
, which implies the continuity of the operator 
A.
Let 
, by the assumption 
 and 
, we have
        
        where
        
Let 
, then
        
□
 Lemma 8.  Operator  is compact. In addition, A is ϖ-Lipschitz.
 Proof.  Taking a bounded subset 
. For any 
, by the Lemma 7, we know 
 is uniformly bounded. Next, we will show that the operator A is equicontinuity. Taking 
, we have
        
        so
        
So, by Ascoli–Arzelà theorem, operator A is compact. Moreover, by Proposition 2, A is -Lipschitz.    □
 Lemma 9.  Assume that the hypothese  holds, then B is ϖ-Lipschitz with constant . Moreoverwhere .  Proof.  Set , it obtain that .
Hence, operator 
B is Lipschitz on X with constant 
, by Proposition 2, B is 
-Lipschitz with constant 
. Moreover, we obtain
        
Set 
, so
        
□
 Theorem 1.  Under hypotheses  and , nonlocal problem (1) has at least one solution  if .  Proof.  Firstly, operators  are clearly bounded and continuous and, by Lemma 8, we obtain that A is -Lipschitz with constant 0. By Lemma 9, B is -Lipschitz with constant . Thus, F is -Lipschitz with constant , and F is strict -constraction with constant  since , we obtain that F is -condensing.
Next, considering set
        
        we prove that 
 is bounded.
Let 
, then 
, and t
        
So, we obtain
        
        thus, we conclude that 
 is bounded.
Finally, by Lemma 3 and repeating the same process of proof in [
6] (Lemma 2), since 
 and by the definition of 
, we have 
, so we obtain 
, it show that the solution of nonlocal problem (
1) is actually in 
. This completes the proof.    □
 Theorem 2.  Assume that  and  hold, then nonlocal problem (1) has a unique solution if , where .  Proof.  Taking 
 and 
, we obtain
        
Let 
, we have
        
Since 
, It follows that operator 
F is strict contraction. By Banach’s fixed point theorem, we know that 
F has a unique fixed point, which implies that nonlocal problem (
1) has a unique solution. This completes the proof.    □
   4. The Existence of Extremal Solutions
Let 
J is an ordered Banach space with the norm 
 and partial order “≤” (i.e., for any 
, 
 is equivalent to 
). In the following, we will investigate the existence of extremal solutions for nonlocal problem (
1).
Definition 12.  If a function  satisfiesthen it is called a lower solution of nonlocal problem (1); if all the inequalities in (7) are reversed, it is called an upper solution of nonlocal problem (1).  Theorem 3.  If nonlocal problem (1) has a lower solution  and an upper solution  with . Suppose that conditions – are satisfied:  There exists a constant  such thatwhere , , . .
 There is a positive constant ℏ such thatand decreasing or increasing monotonic sequences , , . Then the nonlocal problem (1) has minimal and maximal solutions  and  between  and .  Proof.  We define operator 
 as follows
        
        for all 
 Since 
 is continuous, it is obvious that the operator 
S is continuous. Next, the proof process is divided into three steps.
Step 1. We show the operator S is an increasing monotonic operator.
Firstly, by 
 we know 
 by the below
        
In fact, for 
, 
, by 
 we have
        
So from Equation (
7) we obtain that 
.
Step 2. We first show that 
. Let 
, and 
. By Definition (
7) we have
        
        which implies that 
. Similarly, it can be shown that 
. So the operator 
S is a continuous increasing monotonic operator.
Now, we define two iterative sequences 
 and 
 in 
By the monotonicity of 
S, we have
        
Step 3. We show that the sequences  and  are convergent in I.
Here, we obtain 
 and 
, we have 
. From 
 it follows that
        
Let 
, we will show that 
 in 
I.
        
        we have
        
Hence, by Lemma 4, 
 in 
, then for any 
, 
 is precompact. From (
10), the sequence 
 is convergent, that is, 
. In the same way, 
.
Obviously, 
, and 
 is bounded integrable on 
. By (
8) and (
9), using the Lebesgue dominated convergence theorem, letting 
, we obtain that 
, therefore 
 and 
. Similarly, 
, 
. That is, 
.
From the monotonicity of 
S, it is easy to obtain that 
 and 
 are the minimal and maximal solution of the problem (
1) in 
.   □
   5. Ulam Stability
In the section, we will discuss the Ulam–Hyers stability and Ulam–Hyers–Rassias stability of nonlocal problem (
1).
Considering the q-difference nonlocal problem (
1) and the following inequalities:
Definition 13  ([
1,
45]). 
Nonlocal problem (1) is said to be Ulam–Hyers stable if there is a constant  such that for all , and for each solution  of inequalities (11), there is a solution  of Equation  such that Remark 2  ([
1,
45]). 
If the constant  in inequality (13) is replaced with the function  with , then the nonlocal problem (1) is Generalized Ulam–Hyers stable. Definition 14  ([
1,
45]). 
Nonlocal problem (1) is said to be Ulam–Hyers–Rassias stable with respect to φ if there is a constant  such that for all  and each solution  of inequalities (12), there is a solution  of Equation  such that Remark 3  ([
1,
45]). 
If the funtion  in inequality (12) and (14) is replaced with the function , then nonlocal problem (1) is Generalized Ulam–Hyers–Rassias stable. Remark 4  ([
1,
45]). 
If  is a constant in the Definition 14, then nonlocal problem (1) is Ulam–Hyers stable. Theorem 4.  Suppose that – hold, then nonlocal problem (1) is Ulam–Hyers stable.  Proof.  Let 
 be a solution of the inequality (
11), 
 be a solution of nonlocal problem (
1). By inequality (
11), we obtain
        
        we obtain
        
        then
        
        so, we obtain
        
Hence, by the Definition 13, the nonlocal problem (
1) is Ulam–Hyers stable.    □
 Remark 5.  Using the similar proof procedure in the Theorem 4, we can also obtain that the problem (1) is Generalized Ulam–Hyers stable.  Theorem 5.  In addition to assumptions –, assume that
 there is a continuous function  and  such that , let 
Then nonlocal problem (1) is Ulam–Hyers–Rassias stable with respect to φ.  Proof.  Let 
 be a solution of the inequality (
12), 
 be the solution of nonlocal problem (
1). By inequality (
12), we obtain
        
        then
        
        so, we obtain
        
So, by the Definition 14, nonlocal problem (
1) is Ulam–Hyers–Rassias stable.    □
 Remark 6.  Similarly, problem (1) is also Generalized Ulam–Hyers–Rassias stable with respect to φ in the Theorem 5.    6. Examples
Example 1.  Considering the Hilfer fractional q-difference equation with nonlocal condition as follows.where .  For each 
, it is obvious that 
, 
, also 
, that is 
. Moreover
      
Set 
, then
      
      that is, 
, we obtain
      
      so
      
Moreover, let 
 for each 
, there exists a real number 
 such that
      
Hence, the conditions of Theorems 2 and 4 are satisfied, which implies nonlocal problem (
15) has a unique solution and is Ulam–Hyers–Rassias stable with respect to 
.
Example 2.  We consider the following nonlocal Hilfer fractional q-difference extremal solutions:where .  From the above Example 1, we know that 
–
 hold, and for 
,
      
      there exists a constant 
, it have
      
In addition, when 
, then
      
      the monotonic sequences 
, 
, 
, 
. and there will exists a constant 
 has
      
In addition, about ,  holds.
Therefore, by Theorem 3, the nonlocal problem (
16) have minimal and maximal solutions 
 and 
 between 
 and 
.
  7. Conclusions
In this paper, we consider a kind of Hilfer fractional q-difference-integral equations with nonlocal condition in a weighted space of continuous functions. Firstly, the existence and uniqueness results of solutions are obtained by using topological degree theory and Banach fixed point theorem. Subsequently, the existence of extremal solutions in an ordered Banach space is discussed by monotone iterative method. We then consider the Ulam stability results for a nonlocal problem (
1). Finally, two examples are given to illustrate the effectiveness of the theory results.
In the next work, we will continue to study the Hilfer fractional q-difference equation in-depth, considering the equations with impulsive effects, the controllability of the equations and so on.